Skip to content

Commit

Permalink
Highlight.js style declaration in readthedocs theme (#3199)
Browse files Browse the repository at this point in the history
Co-authored-by: Oleh Prypin <oleh@pryp.in>
  • Loading branch information
jbidoret and oprypin committed Apr 28, 2023
1 parent 97440ca commit ea1c6c4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions mkdocs/tests/config/config_tests.py
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
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
Expand Up @@ -10,6 +10,7 @@ search_index_only: false

highlightjs: true
hljs_languages: []
hljs_style: github

analytics:
gtag: null
Expand Down

0 comments on commit ea1c6c4

Please sign in to comment.