Skip to content

Commit

Permalink
chore: add extension
Browse files Browse the repository at this point in the history
  • Loading branch information
AstatineAi committed Jun 5, 2024
1 parent d84a537 commit dbcc596
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 5 deletions.
19 changes: 19 additions & 0 deletions docs/javascript/mathjax.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
window.MathJax = {
tex: {
inlineMath: [["\\(", "\\)"]],
displayMath: [["\\[", "\\]"]],
processEscapes: true,
processEnvironments: true
},
options: {
ignoreHtmlClass: ".*|",
processHtmlClass: "arithmatex"
}
};

document$.subscribe(() => {
MathJax.startup.output.clearCache()
MathJax.typesetClear()
MathJax.texReset()
MathJax.typesetPromise()
})
54 changes: 49 additions & 5 deletions mkdocs.yml → mkdocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,55 @@ site_name: 文化课攻略收集站 for 24OI
repo_name: 'Hanoist/24OI'
repo_url: 'https://github.com/Hanoist/24OI'

theme:
name: material
language: 'zh'
features:
- content.code.annotate
- navigation.tabs
- navigation.expand
palette:
- scheme: default
- accent: indego

markdown_extensions:
- toc:
permalink: true
toc_depth: 4
- meta
- def_list
- attr_list
- md_in_html
- sane_lists
- admonition
- pymdownx.keys
- pymdownx.mark
- pymdownx.tilde
- pymdownx.critic
- pymdownx.details
- pymdownx.snippets
- pymdownx.magiclink
- pymdownx.superfences
- pymdownx.inlinehilite
- pymdownx.tabbed:
alternate_style: true
- pymdownx.tasklist:
custom_checkbox: true
- pymdownx.highlight:
anchor_linenums: true
- pymdownx.arithmatex:
generic: true

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

nav:
- 首页: 'mainpage.md'
- 更新日志: 'log.md'
- 关于站点:
- 首页: 'index.md'
- 更新日志: 'log.md'
- 贡献: 'CONTRIBUTION.md'
- 学习资料: 'file.md'
- 欢迎来到不够完美的高中生活 by Hanoist:
- 在开始之前: 'hanoist/intro.md'
Expand All @@ -32,6 +78,4 @@ nav:
- 结束了?: 'hanoist/4.md'
- 浅谈一点志愿选择: 'hanoist/4_.md'
- 结尾的一点碎碎念: 'hanoist/end.md'
- 寄语 : 'message.md'

theme: material
- 寄语 : 'message.md'

0 comments on commit dbcc596

Please sign in to comment.