Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Highlight.js style declaration in readthedocs theme #3199

Merged
merged 3 commits into from
Apr 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions mkdocs/tests/config/config_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ def test_theme(self, mytheme, custom):
'analytics': {'anonymize_ip': False, 'gtag': None},
'highlightjs': True,
'hljs_languages': [],
'hljs_style': 'github',
'include_homepage_in_sidebar': True,
'prev_next_buttons_location': 'bottom',
'navigation_depth': 4,
Expand All @@ -148,6 +149,7 @@ def test_theme(self, mytheme, custom):
'analytics': {'anonymize_ip': False, 'gtag': None},
'highlightjs': True,
'hljs_languages': [],
'hljs_style': 'github',
'include_homepage_in_sidebar': True,
'prev_next_buttons_location': 'bottom',
'navigation_depth': 4,
Expand All @@ -173,6 +175,7 @@ def test_theme(self, mytheme, custom):
'analytics': {'anonymize_ip': False, 'gtag': None},
'highlightjs': True,
'hljs_languages': [],
'hljs_style': 'github',
'include_homepage_in_sidebar': True,
'prev_next_buttons_location': 'bottom',
'navigation_depth': 4,
Expand Down
2 changes: 1 addition & 1 deletion mkdocs/themes/readthedocs/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<link rel="stylesheet" href="{{ 'css/theme.css'|url }}" />
<link rel="stylesheet" href="{{ 'css/theme_extra.css'|url }}" />
{%- if config.theme.highlightjs %}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/github.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/{{ config.theme.hljs_style }}.min.css" />
{%- endif %}
{%- for path in extra_css %}
<link href="{{ path }}" rel="stylesheet" />
Expand Down
1 change: 1 addition & 0 deletions mkdocs/themes/readthedocs/mkdocs_theme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ search_index_only: false

highlightjs: true
hljs_languages: []
hljs_style: github

analytics:
gtag: null
Expand Down