Switch to mkdocs material theme for documentation#9849
Open
browniebroke wants to merge 25 commits intoencode:mainfrom
Open
Switch to mkdocs material theme for documentation#9849browniebroke wants to merge 25 commits intoencode:mainfrom
browniebroke wants to merge 25 commits intoencode:mainfrom
Conversation
…mkdocs-material # Conflicts: # docs/theme/stylesheets/extra.css # mkdocs.yml
# Conflicts: # requirements/requirements-documentation.txt
Member
Author
|
Configured a dummy RTD project to have a live deployment of the PR: https://browniebroke-drf--2.org.readthedocs.build/en/2/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Explore replacing our theme by mkdocs-material.
Light theme:
Dark theme:
Some things I'm not happy about:
Syntax highlighting for code snippets is lost unless we switch to code fences (no idea how it works now)figured it out and ported the exiting solution to limit the diffSyntax highlighting
Existing solution relies on
prettify-1.0.jswhich is apprently coming from https://github.com/googlearchive/code-prettifytheme.jswhich adds the classprettyprintto all<pre>tagsprettyPrint()on load (via theonloadHTML attribute). This function finds all elements with the class above and add syntax highliting to themI've replicated this in mkdocs-material, however there is some client side navigation, which means we need to listen to another event than DOM content loaded. This is explained in their docs