Skip to content

Commit 754ef40

Browse files
committed
introduce mkdocs
1 parent 4645c92 commit 754ef40

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,15 @@ Translation of http://e-maxx.ru into English
1212
Compiled pages are published at https://cp-algorithms.com/
1313

1414
Manual for contributors: https://cp-algorithms.com/contrib.html
15+
16+
## Prerequisits
17+
18+
```sh
19+
pip install mkdocs-material
20+
```
21+
22+
## Compile pages
23+
24+
```sh
25+
mkdocs serve
26+
```

mkdocs.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
site_name: cp-algorithms
2+
docs_dir: src
3+
theme:
4+
name: material
5+
markdown_extensions:
6+
- pymdownx.arithmatex:
7+
generic: true
8+
- pymdownx.highlight
9+
- pymdownx.superfences
10+
extra_javascript:
11+
- javascript/config.js
12+
- https://polyfill.io/v3/polyfill.min.js?features=es6
13+
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js

src/javascript/config.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
window.MathJax = {
2+
tex: {
3+
inlineMath: [["\\(", "\\)"]],
4+
displayMath: [["\\[", "\\]"]],
5+
processEscapes: true,
6+
processEnvironments: true
7+
},
8+
options: {
9+
ignoreHtmlClass: ".*|",
10+
processHtmlClass: "arithmatex"
11+
}
12+
};
13+
14+
document$.subscribe(() => {
15+
MathJax.typesetPromise()
16+
})

0 commit comments

Comments
 (0)