Skip to content

Commit

Permalink
[docs] Bugfix/syntax highlighting site (#147)
Browse files Browse the repository at this point in the history
* fixed missing space in the README codesnippet

* fixed broken syntax highlighting by ordering defer scripts
  • Loading branch information
anton-karlovskiy authored and addyosmani committed Dec 4, 2019
1 parent a34773e commit 0f644e7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions site/src/_includes/layouts/base.njk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{% include "layouts/footer.njk" %}
<div class="back-to-top hidden">&uarr;</div>
</main>
<script type="text/javascript" src="{{ '/script.js' | url }}" defer></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/quicklink/{{ site.quicklinkVersion }}/quicklink.umd.js"></script>
<script>
window.addEventListener('load', () => {
Expand All @@ -18,7 +18,7 @@
</script>
<script defer src="https://buttons.github.io/buttons.js"></script>
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js"></script>
<script defer src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.10/highlight.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/highlightjs@9.16.2/highlight.pack.min.js"></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-153597376-1"></script>
<script>
Expand All @@ -28,7 +28,7 @@
gtag('config', 'GA_MEASUREMENT_ID', { 'transport_type': 'beacon' });
gtag('config', 'UA-153597376-1');
</script>

<script type="text/javascript" src="{{ '/script.js' | url }}" defer></script>
</body>

</html>
2 changes: 1 addition & 1 deletion site/src/_includes/layouts/head.njk
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
onload="this.onload=null;this.rel='stylesheet'">
<link rel="preload" href="{{ '/styles/github-markdown.min.css' | url }}" as="style"
onload="this.onload=null;this.rel='stylesheet'">
<link rel="preload" href="{{ '/styles/solarized-dark.min.css' | url }}" as="style"
<link rel="preload" href="{{ 'https://cdn.jsdelivr.net/npm/highlightjs@9.16.2/styles/solarized-dark.min.css' | url }}" as="style"
onload="this.onload=null;this.rel='stylesheet'">
<link rel="stylesheet" href="{{ '/styles/main.css' | url }}">
<link rel="stylesheet" href="{{ '/styles/footer.css' | url }}">
Expand Down
4 changes: 2 additions & 2 deletions site/src/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ window.addEventListener('load', () => {
console.error('[clipboard error] Action:', e.action);
console.error('[clipboard error] Trigger:', e.trigger);
});
});

hljs.initHighlightingOnLoad();
});
hljs.initHighlightingOnLoad();
1 change: 0 additions & 1 deletion site/src/styles/solarized-dark.min.css

This file was deleted.

0 comments on commit 0f644e7

Please # to comment.