Skip to content

Commit

Permalink
Update docs configuration due to upstream mkdocs-material changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nunofachada committed Jan 23, 2024
1 parent c78a899 commit 3f171dc
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 63 deletions.
31 changes: 17 additions & 14 deletions docs/docs/javascripts/mathjax.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
window.MathJax = {
tex: {
inlineMath: [["\\(", "\\)"]],
displayMath: [["\\[", "\\]"]],
processEscapes: true,
processEnvironments: true
},
options: {
ignoreHtmlClass: ".*|",
processHtmlClass: "arithmatex"
}
};
tex: {
inlineMath: [["\\(", "\\)"]],
displayMath: [["\\[", "\\]"]],
processEscapes: true,
processEnvironments: true
},
options: {
ignoreHtmlClass: ".*|",
processHtmlClass: "arithmatex"
}
};

document$.subscribe(() => {
MathJax.typesetPromise()
})
document$.subscribe(() => {
MathJax.startup.output.clearCache()
MathJax.typesetClear()
MathJax.texReset()
MathJax.typesetPromise()
})
119 changes: 70 additions & 49 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,63 +16,84 @@ theme:
palette:
accent: deep orange
features:
- navigation.instant
- navigation.expand
- navigation.indexes
- navigation.tabs
- navigation.tabs.sticky
- toc.integrate
- navigation.instant
- navigation.expand
- navigation.indexes
- navigation.tabs
- navigation.tabs.sticky
- toc.integrate

plugins:
- search
- gallery:
examples_dirs: docs/examples
gallery_dirs: docs/generated/gallery
within_subsection_order: FileNameSortKey
run_stale_examples: true
reset_modules: []
- mkdocstrings:
default_handler: python
handlers:
python:
import:
- https://docs.python.org/3/objects.inv
- https://numpy.org/doc/stable/objects.inv
options:
docstring_style: google
show_root_toc_entry: false
show_submodules: no
heading_level: 2
line_length: 80
show_signature_annotations: true
separate_signature: true
- search
- gallery:
examples_dirs: docs/examples
gallery_dirs: docs/generated/gallery
within_subsection_order: FileNameSortKey
run_stale_examples: true
reset_modules: []
- mkdocstrings:
default_handler: python
handlers:
python:
import:
- https://docs.python.org/3/objects.inv
- https://numpy.org/doc/stable/objects.inv
options:
docstring_style: google
show_root_toc_entry: false
show_submodules: no
heading_level: 2
line_length: 80
show_signature_annotations: true
separate_signature: true

watch:
- ../pyclugen

nav:
- Home: index.md
- Theory: theory.md
- Examples: generated/gallery
- Reference: reference.md
- Development: dev.md
- Home: index.md
- Theory: theory.md
- Examples: generated/gallery
- Reference: reference.md
- Development: dev.md

markdown_extensions:
- admonition
- attr_list
- pymdownx.highlight:
anchor_linenums: true
guess_lang: true
- pymdownx.inlinehilite
- pymdownx.snippets
- pymdownx.superfences
- pymdownx.arithmatex:
generic: true
- toc:
toc_depth: 2
permalink: true

# Python Markdown
- abbr
- admonition
- attr_list
- def_list
- footnotes
- md_in_html
- toc:
toc_depth: 2
permalink: true

# Python Markdown Extensions
- pymdownx.arithmatex:
generic: true
- pymdownx.betterem:
smart_enable: all
- pymdownx.caret
- pymdownx.details
- pymdownx.emoji:
emoji_index: !!python/name:material.extensions.emoji.twemoji
emoji_generator: !!python/name:material.extensions.emoji.to_svg
- pymdownx.highlight:
anchor_linenums: true
- pymdownx.inlinehilite
- pymdownx.keys
- pymdownx.mark
- pymdownx.smartsymbols
- pymdownx.superfences
- pymdownx.tabbed:
alternate_style: true
- pymdownx.tasklist:
custom_checkbox: true
- pymdownx.tilde

extra_javascript:
- javascripts/mathjax.js
- https://polyfill.io/v3/polyfill.min.js?features=es6
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
- javascripts/mathjax.js
- https://polyfill.io/v3/polyfill.min.js?features=es6
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js

0 comments on commit 3f171dc

Please sign in to comment.