diff --git a/docs/javascripts/katex.js b/docs/javascripts/katex.js new file mode 100644 index 0000000..8debf9f --- /dev/null +++ b/docs/javascripts/katex.js @@ -0,0 +1,11 @@ +document$.subscribe(({ body }) => { + renderMathInElement(body, { + delimiters: [ + { left: "$$", right: "$$", display: true }, + { left: "$", right: "$", display: false }, + { left: "\\(", right: "\\)", display: false }, + { left: "\\[", right: "\\]", display: true } + ], + }) + }) + \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 9fbcae7..219d92f 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,8 +1,10 @@ site_name: RenderCV site_description: A Python application that creates a CV in PDF from a YAML/JSON input file. +site_author: Sina Atalay +copyright: Copyright © 2023 Sina Atalay site_url: https://sinaatalay.github.io/rendercv/ -repo_name: sinaatalay/rendercv repo_url: https://github.com/sinaatalay/rendercv +repo_name: sinaatalay/rendercv edit_uri: edit/main/docs/ theme: @@ -22,18 +24,30 @@ theme: toggle: icon: material/lightbulb name: "Switch to light mode" + + font: + text: Roboto + code: Roboto Mono + features: - - content.tabs.link - - content.code.annotate - - content.code.copy + - content.code.copy # the copy-to-clipboard buttons for code blocks + - content.action.view # view source button for pages + - navigation.footer # the previous and next buttons in the footer + - navigation.indexes # allow mother pages to have their own index pages + - navigation.tabs # render classical type of navbar at top + - navigation.top # back to top button + - search.highlight # highlight search results after going to a page + - search.suggest # show search suggestions while typing + - toc.follow # if toc sidebar doesn't fit, scroll to the active heading nav: - Quick Start: index.md - Contact: contact.md - Code Reference: + - Code Reference: reference/index.md - __main__.py: reference/__main__.md - data_model.py: reference/data_model.md - - tinytex.py: reference/tinytex.md + - rendering.py: reference/rendering.md plugins: - search @@ -48,4 +62,12 @@ plugins: docstring_section_style: list merge_init_into_class: true show_docstring_attributes: true - docstring_style: google \ No newline at end of file + docstring_style: google + +extra_javascript: + - javascripts/katex.js + - https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.7/katex.min.js + - https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.7/contrib/auto-render.min.js + +extra_css: + - https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.7/katex.min.css