Repository navigation
Expand file tree
/
Copy pathmkdocs.yml
More file actions
137 lines (127 loc) · 3.5 KB
/
Copy pathmkdocs.yml
File metadata and controls
137 lines (127 loc) · 3.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
site_name: Canwdev's Blog
repo_url: https://github.com/canwdev/canwdev.github.io
repo_name: canwdev/canwdev.github.io
edit_uri: edit/main/docs/
# Keep Obsidian vault config out of the published site
exclude_docs: |
.obsidian/**
theme:
name: material
language: zh
features:
- content.code.copy
- content.code.annotate
- content.action.edit
- navigation.instant
- navigation.tracking
- navigation.top
- navigation.footer
- toc.follow
- search.highlight
- search.suggest
palette:
# Palette toggle for automatic mode
- media: "(prefers-color-scheme)"
toggle:
icon: material/brightness-auto
name: Switch to light mode
# Palette toggle for light mode
- media: "(prefers-color-scheme: light)"
scheme: default
primary: indigo
accent: blue
toggle:
icon: material/brightness-7
name: Switch to dark mode
# Palette toggle for dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
primary: orange
accent: amber
toggle:
icon: material/brightness-4
name: Switch to system preference
markdown_extensions:
# Python Markdown
- abbr
- admonition
- attr_list
- def_list
- footnotes
- md_in_html
# Obsidian soft line breaks (also helps multi-line callouts)
- nl2br
# Obsidian/GFM-style 2-space nested lists (Python-Markdown defaults to 4)
- mdx_truly_sane_lists:
nested_indent: 2
# Use pymdownx slugify so Chinese headings keep CJK in ids (default toc slugify → "#npmyarn")
# Matches Obsidian / roamlinks anchors like "#设置-npmyarn-镜像"
- toc:
permalink: true
slugify: !!python/object/apply:pymdownx.slugs.slugify
kwds:
case: lower
# 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
auto_title: true
linenums: true
- pymdownx.inlinehilite
- pymdownx.keys
# Autolink bare URLs like https://example.com
- pymdownx.magiclink
- pymdownx.mark
- pymdownx.smartsymbols
- pymdownx.superfences
- pymdownx.tabbed:
alternate_style: true
- pymdownx.tasklist:
custom_checkbox: true
- pymdownx.tilde
# Obsidian vault helpers (#hashtag, attachments, shield `[[` in code from roamlinks)
hooks:
- hooks/obsidian_fence_protect.py
- hooks/obsidian_hashtags.py
- hooks/obsidian_attachments.py
- hooks/obsidian_fence_restore.py
plugins:
- search
# Obsidian [[wikilinks]]
- roamlinks
# Obsidian > [!WARNING] callouts → Material admonitions
- callouts
# Page created / last updated from git history
- git-revision-date-localized:
enable_creation_date: true
type: datetime
timezone: Asia/Shanghai
locale: zh
fallback_to_build_date: true
# Click images to open lightbox
- glightbox:
touchNavigation: true
loop: false
effect: zoom
width: 100%
height: auto
zoomable: true
draggable: true
auto_caption: true
# Tags index: frontmatter `tags:` + inline Obsidian `#hashtag` (via hooks)
# Listing injected via <!-- material/tags --> in docs/tags.md
- tags:
extra_css:
- stylesheets/extra.css
extra:
social:
- icon: fontawesome/brands/github
link: https://github.com/canwdev/