Keep existing syntax highlighting

This commit is contained in:
Bruno Alla 2026-02-10 08:32:06 +00:00
parent 3091af7f9f
commit 35be8fb04e
4 changed files with 17 additions and 0 deletions

13
docs/theme/main.html vendored Normal file
View File

@ -0,0 +1,13 @@
{% extends "base.html" %}
{% block scripts %}
{{ super() }}
<script>
document$.subscribe(function() {
document.querySelectorAll('pre code').forEach(code => {
code.parentElement.classList.add('prettyprint', 'well');
});
prettyPrint();
});
</script>
{% endblock %}

View File

@ -6,6 +6,7 @@ repo_url: https://github.com/encode/django-rest-framework
theme:
name: material
custom_dir: docs/theme
favicon: theme/img/favicon.ico
logo: theme/img/logo.png
palette:
@ -46,6 +47,9 @@ theme:
extra_css:
- theme/stylesheets/extra.css
- theme/stylesheets/prettify.css
extra_javascript:
- theme/js/prettify-1.0.js
markdown_extensions:
- admonition