From 35be8fb04eed943b70e31f4cdcdbae88a8f92346 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Tue, 10 Feb 2026 08:32:06 +0000 Subject: [PATCH] Keep existing syntax highlighting --- {docs_theme => docs/theme}/js/prettify-1.0.js | 0 docs/theme/main.html | 13 +++++++++++++ .../css => docs/theme/stylesheets}/prettify.css | 0 mkdocs.yml | 4 ++++ 4 files changed, 17 insertions(+) rename {docs_theme => docs/theme}/js/prettify-1.0.js (100%) create mode 100644 docs/theme/main.html rename {docs_theme/css => docs/theme/stylesheets}/prettify.css (100%) diff --git a/docs_theme/js/prettify-1.0.js b/docs/theme/js/prettify-1.0.js similarity index 100% rename from docs_theme/js/prettify-1.0.js rename to docs/theme/js/prettify-1.0.js diff --git a/docs/theme/main.html b/docs/theme/main.html new file mode 100644 index 000000000..cdf04667e --- /dev/null +++ b/docs/theme/main.html @@ -0,0 +1,13 @@ +{% extends "base.html" %} + +{% block scripts %} + {{ super() }} + +{% endblock %} \ No newline at end of file diff --git a/docs_theme/css/prettify.css b/docs/theme/stylesheets/prettify.css similarity index 100% rename from docs_theme/css/prettify.css rename to docs/theme/stylesheets/prettify.css diff --git a/mkdocs.yml b/mkdocs.yml index eafd91a47..01622d0ab 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -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