Skip to content

Commit c81ab54

Browse files
chore(mkdocs): add some customizations, pymdown
1 parent a7e4c01 commit c81ab54

File tree

3 files changed

+30
-1
lines changed

3 files changed

+30
-1
lines changed

template/docs/js/extra-loader.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// See https://facelessuser.github.io/pymdown-extensions/extras/mermaid/#custom-loader
2+
// And https://github.com/facelessuser/pymdown-extensions/blob/main/docs/src/js/material-extra-3rdparty.js
3+

template/mkdocs.yml.jinja

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,46 @@
11
---
22
site_name: "{{project_name}}"
33
theme:
4+
# https://www.mkdocs.org/user-guide/configuration/#theme
45
name: material
6+
icon:
7+
logo: material/book-open-page-variant
58
# palette:
69
# scheme: slate
710
# primary: cyan
811
features:
912
- content.tabs.link
13+
- header.autohide # maximum screen space during scrolling
14+
- navigation.expand # optimize user experience
15+
- navigation.instant # optimize user experience
16+
- navigation.instant.progress
17+
- navigation.tracking # update address bar
18+
- search.suggest # suggest good completions
19+
- content.code.copy # enable copy to clipboard
1020

11-
# for adding extra css/js see https://www.mkdocs.org/user-guide/customizing-your-theme/
21+
# extra css/js see https://www.mkdocs.org/user-guide/customizing-your-theme/
22+
extra_css: []
23+
extra_javascript: []
1224

1325
plugins:
1426
- search
1527
- mknotebooks:
1628
execute: false
1729
- mermaid2:
1830
version: 11.4.1
31+
- mkdocs_pymdownx_material_extras:
32+
# https://pypi.org/project/mkdocs-pymdownx-material-extras
33+
34+
markdown_extensions:
35+
- pymdownx.superfences:
36+
# https://mkdocs-mermaid2.readthedocs.io/en/latest/superfences
37+
# custom code highlighting rules
38+
custom_fences:
39+
- name: mermaid
40+
# disable code highlighting to display diagrams
41+
format: !!python/name:pymdownx.superfences.fence_code_format
42+
class: mermaid
43+
1944
# TODO rebuild docs on schema change (https://github.com/dalito/linkml-project-copier/issues/39)
2045
# - gen-files:
2146
# scripts:

template/pyproject.toml.jinja

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ dev = [
2323
"linkml>=1.9.3",
2424
"mkdocs-material>=8.2.8",
2525
"mkdocs-mermaid2-plugin>=1.1.1",
26+
"mkdocs-pymdownx-material-extras>=2.5.6",
2627
"jupyter>=1.0.0",
2728
"mknotebooks>= 0.8.0",
2829
]

0 commit comments

Comments
 (0)