Skip to content

Commit

Permalink
Refactor highlight.js integration to use static assets and improve lo…
Browse files Browse the repository at this point in the history
…ading behavior
  • Loading branch information
julioest committed Dec 11, 2024
1 parent ede21f0 commit dc9a755
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
9 changes: 9 additions & 0 deletions static/css/highlight-js.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions static/js/highlight.js

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions templates/libraries/detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,17 @@ <h2 class="text-2xl">All Time</h2>
{% endif %}

</main>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
<link rel="stylesheet" href="{% static 'css/highlight-js.min.css' %}">
<script src="{% static 'js/highlight.js' %}"></script>

{% endblock %}
{% block footer_js %}

<script>hljs.highlightAll();</script>
<script>
window.addEventListener('load', function() {
hljs.highlightAll();
});
</script>
<script>
var options = {
series: [{
Expand Down

0 comments on commit dc9a755

Please sign in to comment.