Skip to content

Commit c9eeb3d

Browse files
committed
更改字体加载
1 parent ec60947 commit c9eeb3d

3 files changed

Lines changed: 14 additions & 4 deletions

File tree

docs/stylesheets/extra.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,8 @@ img[alt="logo"] {
5858
font-display: swap;
5959
font-style: normal;
6060
font-weight: 100 900;
61-
}
61+
}
62+
:root {
63+
--md-text-font: "Noto Sans SC - local", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
64+
}
65+

mkdocs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
site_name: Power's Wiki
1+
site_name: Power's Wiki
22
site_description: 博览万物,融会贯通。
33
site_url: https://wiki-power.com/
44
repo_url: https://github.com/linyuxuanlin/Wiki_MkDocs
@@ -9,8 +9,8 @@ INHERIT: mkdocs.nav.yml
99

1010
theme:
1111
name: material
12-
font: #false # 国内网络访问 Google 源可能会有问题
13-
text: "Noto Sans SC - local"
12+
font: false # 国内网络访问 Google 源可能会有问题
13+
#text: "Noto Sans SC - local"
1414
#code: Roboto Mono
1515
palette:
1616
- media: "(prefers-color-scheme: light)" # 检查用户系统配置是否为亮色

overrides/main.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{% extends "base.html" %}
2+
3+
{% block extrahead %}
4+
{{ super() }}
5+
<link rel="preload" href="{{ 'stylesheets/NotoSansSC-VariableFont_wght.woff2' | url }}" as="font" type="font/woff2" crossorigin>
6+
{% endblock %}

0 commit comments

Comments
 (0)