Skip to content

Commit ebe44ac

Browse files
committed
Minor update
1 parent b08f51a commit ebe44ac

17 files changed

+50
-83
lines changed

docs/README.md

+2-18
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,6 @@
11
在使用 「Material」主题之前,请仔细阅读 Hexo 的[官方文档](https://hexo.io/zh-cn/docs/index.html),完成对 Hexo 的安装和基本的配置。
22

3-
>在本文档中,我们假定你已经成功安装了 Hexo,并根据 Hexo 的文档创建了一个站点,**并完成了基本的设置**
3+
> 在本文档中,我们假定你已经成功安装了 Hexo,并根据 Hexo 的文档创建了一个站点,**并完成了基本的设置**
44
5-
在 Hexo 中,通常有两份配置文件,一个是站点根目录下的 `_config.yml`;另外一个是主题目录下的 `_config.yml`
5+
在 Hexo 中,通常有两份配置文件,一个是站点根目录下的 `_config.yaml`;另外一个是主题目录下的 `_config.yaml`
66
为了描述方便,在以下说明中,将前者称为 **站点配置文件**,后者称为 **主题配置文件**
7-
8-
----
9-
10-
「Material」主题文档包括以下部分:
11-
12-
- [开始使用](start)
13-
- 主题配置
14-
- [基本配置](config/basic)
15-
- [样式设定](config/style)
16-
- [自定义设定](config/customize)
17-
- [菜单设定](config/menu)
18-
- [第三方服务](config/services)
19-
- [进阶使用](expert)
20-
- [独立页面](pages)
21-
- [开始创作](compose)
22-
- [捐赠](donate)

docs/config_basic.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
>例如:选用繁體中文,则配置为:
2121
22-
```yml
22+
```yaml
2323
language: zh-TW
2424
```
2525

docs/config_customize.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
你可以在页面的 Footer 指定你想显示的文字,支持 HTML 标签;默认为空。
1414
比如,备案号可以这样设定:
1515

16-
```yml
16+
```yaml
1717
footer_text: '<a href="http://www.miitbeian.gov.cn" rel="nofollow">某ICP备xxxxxxxx号-x</a>'
1818
```
1919
@@ -22,9 +22,9 @@ footer_text: '<a href="http://www.miitbeian.gov.cn" rel="nofollow">某ICP备xxxx
2222
使用 `Google Prettify` 或 `hanabi` 实现代码高亮。你只能启用他们中的一个。
2323
启用之前你需要禁用 Hexo 自带的代码高亮。
2424

25-
```yml
25+
```yaml
2626
# Available value for `prettify` or `hanabi`: true | false
27-
# You can only enable one of them to avoid issues. Also you need to check highlight option in _config.yml. Make sure that default hexo built in highlight plugin is disabled.
27+
# You can only enable one of them to avoid issues. Also you need to check highlight option in _config.yaml. Make sure that default hexo built in highlight plugin is disabled.
2828
# highlight:
2929
# enable: false
3030
#
@@ -57,7 +57,7 @@ hanabi:
5757
你可以在每篇文章的结尾添加你的版权说明,支持 HTML 标签。License 以粗体显示,默认为空。
5858
比如,你可这样设定 CC License。
5959

60-
```yml
60+
```yaml
6161
license: 'This blog is under a <a href="/creativecommons.html" target="_blank">CC BY-NC-SA 3.0 Unported License</a>'
6262
```
6363
> 你也可以在页面的 Front-Matter 中为不同文章添加不同的 License。

docs/config_services.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Material 主题提供了两种使用 [Disqus](https://disqus.com/) 主题的方
3535

3636
>例如:Disqus 域名 `example.disqus.com`
3737
38-
> ```yml
38+
> ```yaml
3939
shortname: example
4040
```
4141
@@ -86,7 +86,7 @@ Material 主题内置了 `google ` `swiftype` `local` 三种搜索系统。
8686
使用本地搜索需要安装 [hexo-generator-search](https://github.com/PaicHyperionDev/hexo-generator-search) 插件。
8787
8888
然后在 `站点配置` 文件中添加
89-
```yml
89+
```yaml
9090
search:
9191
path: search.xml
9292
field: all
@@ -122,7 +122,7 @@ search:
122122
123123
### 其它统计服务
124124
125-
确保 上述配置的字段为空,然后在在 `head.yml` 中填入你的统计服务代码。如何使用 `head.yml`,请访问[进阶设定](/expert/)中关于 自定义代码 的部分。
125+
确保 上述配置的字段为空,然后在在 `head.yaml` 中填入你的统计服务代码。如何使用 `head.yaml`,请访问[进阶设定](/expert/)中关于 自定义代码 的部分。
126126
127127
### PV&UV 统计
128128

docs/config_style.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ footer_image:
118118
119119
> `fonts.family` 默认值为 `Roboto, "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif`
120120
> 该字体设定为 Material Design 的规范,如无特殊要求 无需额外修改。
121-
> 当你修改字体时,请在 `head.yml` 内使用 `<link>` 标签引用你的字体源。如何使用 `head.yml`,请访问[进阶设定](/expert/)中关于 自定义代码 的部分。
121+
> 当你修改字体时,请在 `head.yaml` 内使用 `<link>` 标签引用你的字体源。如何使用 `head.yaml`,请访问[进阶设定](/expert/)中关于 自定义代码 的部分。
122122
123123
- `use`: 用于设置站点字体的引用方式。Material 主题内置了以下三种字体库支持。除此以外,你也可以手动设定你喜欢的谷歌字体反代服务。
124124
- `google`: 使用 Google 字体库加载 `Roboto` 字体。

docs/en/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Before using "Material", please read the [Hexo documentions](https://hexo.io/doc
22

33
> In this docs, we suppose you just succefully installed the Hexo, and already configure your new site.
44
5-
In Hexo, there are usually two configuration files, both called `_config.yml`. The first one is in the site root directory; the other is in the theme directory.
5+
In Hexo, there are usually two configuration files, both called `_config.yaml`. The first one is in the site root directory; the other is in the theme directory.
66
For convenience of description, in the following description, the former is referred to as the **site config** and the latter as the **theme config**.
77

88
----

docs/en/config_customize.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ When it is empty, the footer will only show the current year.
1212
You can specify the text you want to show in footer, HTML tag is supported.
1313
For example, you can setup ICP license number as:
1414

15-
```yml
15+
```yaml
1616
footer_text: '<a href="http://www.miitbeian.gov.cn" rel="nofollow">某ICP备xxxxxxxx号-x</a>'
1717
```
1818
@@ -29,11 +29,11 @@ Use this to show qrcode in your article.
2929
## Code
3030

3131
Use `Google Prettify` or `hanabi` to highlight the code
32-
if true, check highlight option in _config.yml. Make sure that default code highlight plugin is disabled.
32+
if true, check highlight option in _config.yaml. Make sure that default code highlight plugin is disabled.
3333

34-
```yml
34+
```yaml
3535
# Available value for `prettify` or `hanabi`: true | false
36-
# You can only enable one of them to avoid issues. Also you need to check highlight option in _config.yml. Make sure that default hexo built in highlight plugin is disabled.
36+
# You can only enable one of them to avoid issues. Also you need to check highlight option in _config.yaml. Make sure that default hexo built in highlight plugin is disabled.
3737
# highlight:
3838
# enable: false
3939
#
@@ -63,7 +63,7 @@ hanabi:
6363
You can specify the text you want to show in the end of your posts and pages, HTML tag is supported.
6464
For example, you can setup a CC license as:
6565
66-
```yml
66+
```yaml
6767
license: 'This blog is under a <a href="/creativecommons.html" target="_blank">CC BY-NC-SA 3.0 Unported License</a>'
6868
```
6969
> You can also use Front-Matter `license` to override this setting.

docs/en/config_services.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Material theme has a built in Baidu's, Google's website analytics and CNZZ's ana
9595

9696
### Other Analytics
9797

98-
You should left the all the site_id empty below. Then you can add the analytics code in `head.yml`. You can read the [expert](/en/expert/) about how to use `head.yml`.
98+
You should left the all the site_id empty below. Then you can add the analytics code in `head.yaml`. You can read the [expert](/en/expert/) about how to use `head.yaml`.
9999

100100
### Leancloud
101101

docs/en/config_style.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ footer_image:
117117

118118
> The default values are `Roboto, Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Microsoft Yahe, Arial`
119119
> The font settings are more standardized for Material Design, no special requirements without additional changes.
120-
> When update the fonts, you should add fonts embed in `head.yml`. You can read [expert](/en/expert/) about how to use `head.yml`
120+
> When update the fonts, you should add fonts embed in `head.yaml`. You can read [expert](/en/expert/) about how to use `head.yaml`
121121

122122
- `use`: Used to set which fonts lib will be uesd in the theme.
123123

docs/en/expert.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
If you want to add custom code, like `font-face` or statistical code (such as `Piwik Analytics`) to your site, you need to create a folder named `_data` (no rename) in the `source` folder in your site directory.
66

7-
Then create a file called `head.yml` in the file:
7+
Then create a file called `head.yaml` in the file:
88

99
```yaml
1010
Name:
@@ -13,7 +13,7 @@ Name:
1313
1414
The code will be displayed before `</head>` tag. `Name` will appear as a comment above the code.
1515

16-
Also, if you want to add custom code before `</html>` , simply create a file called `footer.yml` in `_data`. Same usage as `head.yml`
16+
Also, if you want to add custom code before `</html>` , simply create a file called `footer.yaml` in `_data`. Same usage as `head.yaml`
1717

1818
## Material icons
1919

@@ -22,8 +22,8 @@ The list of icon used to customized the dropdown or page buttons is available [h
2222
## Code highlight
2323

2424
From `Version 1.3.0`, you can use `hexo-prism-plugin` to highlight your codes, visit [Hexo-Prism-Plugin Github](https://github.com/ele828/hexo-prism-plugin) to learn more.
25-
2625
From `Version 1.4.5`, Material built in the `Google Prettify` for code_highlight.
26+
From `Version 1.5.0`, Material built in the `Hanibi` for code_highlight.
2727

2828
## Files Vendors
2929

@@ -40,7 +40,7 @@ Here is an example of configuration.
4040

4141
```yaml
4242
vendors:
43-
materialcdn: https://materialcdn.nfz.moe/hexo/1.3.2
43+
materialcdn: https://cdn.jsdelivr.net/gh/viosey/hexo-theme-material@latest/source
4444
```
4545
-----
4646

docs/en/install.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ Once you have the `themes/material` folder, open the **site config**, find the `
3030

3131
> The folder `themes/material` can be named differently if you wish. You simply have to adapt the `theme` field accordingly.
3232
33-
**The `_config.yml` file does not exist in the theme, you need to manually duplicate the `_config.template.yml` file and rename it to `_config.yml`**
33+
**The `_config.yaml` file does not exist in the theme, you need to manually duplicate the `_config.template.yaml` file and rename it to `_config.yaml`**
3434

3535
Run `hexo s --debug` and go to [`http://localhost:4000`](http://localhost:4000) to make sure the site is running properly.
3636

3737
## Update "Material"
3838

3939
### Direct download
4040

41-
Save your `_config.yml` file somewhere. Then download a new [stable release](https://github.com/viosey/hexo-theme-material/releases) and extract the content inside the `themes/material` directory. Finally reconcile the new version of the `_config.yml` with the one you saved.
41+
Save your `_config.yaml` file somewhere. Then download a new [stable release](https://github.com/viosey/hexo-theme-material/releases) and extract the content inside the `themes/material` directory. Finally reconcile the new version of the `_config.yaml` with the one you saved.
4242

4343
The previous commands will put aside your custom config, pull the update reapply your modifications. Fix conflicts if needed.
4444

@@ -48,15 +48,15 @@ NPM updates can be done in two ways:
4848

4949
#### NPM update
5050

51-
Save your `_config.yml` file somewhere. Then use:
51+
Save your `_config.yaml` file somewhere. Then use:
5252

5353
```bash
5454
npm update hexo-material
5555
rm -R themes/material
5656
cp -R node_modules/hexo-material/ themes/material
5757
```
5858

59-
Finally reconcile the new version of the `_config.yml` with the one you saved.
59+
Finally reconcile the new version of the `_config.yaml` with the one you saved.
6060

6161
#### npm-check
6262

@@ -68,7 +68,7 @@ Install npm-check:
6868
npm install -g npm-check
6969
```
7070

71-
Save your `_config.yml` file somewhere. Then use:
71+
Save your `_config.yaml` file somewhere. Then use:
7272

7373
```bash
7474
npm-check hexo-material

docs/en/pages.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ If you want to add a link to the "Link" page, please refer to the [page settings
2020

2121
### Add data
2222

23-
Create a folder named `_data` (rename is forbidden) within the `source` folder. Then create a file named `links.yml` inside this folder.
23+
Create a folder named `_data` (rename is forbidden) within the `source` folder. Then create a file named `links.yaml` inside this folder.
2424

2525
The format for a single link is:
2626

@@ -53,7 +53,7 @@ If you'd like to add an entry to the "Gallery" page, please refer to the [page s
5353

5454
### Add data
5555

56-
Create a folder named `_data` (rename is forbidden) within the `source` folder. Then create a file named `gallery.yml` inside this folder.
56+
Create a folder named `_data` (rename is forbidden) within the `source` folder. Then create a file named `gallery.yaml` inside this folder.
5757

5858
The format for a single image is:
5959

docs/en/start.md

+2-11
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,21 @@
22

33
Installation of an Hexo theme is quite simple. You simply need to put the theme directory inside the `themes` directory of your site and modify the theme config.
44

5-
### Github
6-
75
You can get a [stable release](https://github.com/viosey/hexo-theme-material/releases) from Github in a timely manner.
86

9-
### npm
10-
11-
```
12-
npm install hexo-material
13-
```
14-
>This way the material theme will be downloaded to the `node_modules` folder under the hexo directory.
15-
167
## Enable "Material"
178

189
Download a [stable release](https://github.com/viosey/hexo-theme-material/releases) and extract the content inside the `themes/material` directory.
1910
Once you have the `themes/material` folder, open the **site config**, find the `theme` field, and change its value to `material`.
2011

2112
> The folder `themes/material` can be named differently if you wish. You simply have to adapt the `theme` field accordingly.
2213
23-
**The `_config.yml` file does not exist in the theme, you need to manually duplicate the `_config.template.yml` file and rename it to `_config.yml`**
14+
**The `_config.yaml` file does not exist in the theme, you need to manually duplicate the `_config.template.yaml` file and rename it to `_config.yaml`**
2415

2516
Run `hexo s --debug` and go to [`http://localhost:4000`](http://localhost:4000) to make sure the site is running properly.
2617

2718
## Update "Material"
2819

29-
Save your `_config.yml` file somewhere. Then download a new [stable release](https://github.com/viosey/hexo-theme-material/releases) and extract the content inside the `themes/material` directory. Finally reconcile the new version of the `_config.yml` with the one you saved.
20+
Save your `_config.yaml` file somewhere. Then download a new [stable release](https://github.com/viosey/hexo-theme-material/releases) and extract the content inside the `themes/material` directory. Finally reconcile the new version of the `_config.yaml` with the one you saved.
3021

3122
The previous commands will put aside your custom config, pull the update reapply your modifications. Fix conflicts if needed.

docs/expert.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88

99
如果想要在站点的 `<head>` 之前添加自定义 `font-face` 或者统计代码(例如 `Piwik Analytics`)。
1010

11-
需要在 hexo 目录下的 `source` 文件夹内创建一个名为 `_data`(禁止改名)的文件夹,并在文件内创建一个名为 head.yml 的文件。
11+
需要在 hexo 目录下的 `source` 文件夹内创建一个名为 `_data`(禁止改名)的文件夹,并在文件内创建一个名为 `head.yaml` 的文件。
1212

1313
单个代码格式为:
1414

15-
```yml
15+
```yaml
1616
Name:
1717
"put your code here"
1818
```
@@ -21,17 +21,17 @@ Name:
2121

2222
---
2323

24-
如果想要在站点的 `</html>` 之前添加自定义代码(例如 `Service Worker`)。
24+
如果想要在站点的 `</body>` 之前添加自定义代码(例如 `Service Worker`)。
2525

26-
需要在 hexo 目录下的 `source` 文件夹内创建一个名为 `_data`(禁止改名)的文件夹,并在文件内创建一个名为 footer.yml 的文件。
26+
需要在 hexo 目录下的 `source` 文件夹内创建一个名为 `_data`(禁止改名)的文件夹,并在文件内创建一个名为 `footer.yaml` 的文件。
2727
单个代码格式为:
2828

29-
```yml
29+
```yaml
3030
Name:
3131
"put your code here"
3232
```
3333

34-
代码将显示在 `</html>` 之前。
34+
代码将显示在 `</body>` 之前。
3535

3636
## Material 图标
3737

@@ -43,6 +43,7 @@ Name:
4343

4444
从 `1.3.0` 版本开始,您可以使用 `hexo-prism-plugin` 进行代码染色,具体文档请参阅 [Hexo-Prism-Plugin 插件文档](https://github.com/ele828/hexo-prism-plugin)
4545
从 `1.4.5` 版本开始,您可以使用主题内置的 `Google Prettify` 进行代码染色。具体文档请参阅主题配置。
46+
从 `1.5.0` 版本开始,您可以使用主题内置的 `Hanabi` 进行代码染色。具体文档请参阅主题配置。
4647

4748
## 使用 CDN
4849

docs/index.html

+5-4
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
<meta name="description" content="Material theme, an elegant & Material Design theme.">
88
<meta name="keywords" content="Hexo, hexo, theme, hexo theme, viosey, material theme, material design, material 主题">
99
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
10-
<link rel="shortcut icon" href="https://github.elemecdn.com/neko-dev/material-theme-docs/1.5.3.1/static/favicon.ico" type="image/x-icon">
11-
<link rel="icon" href="https://github.elemecdn.com/neko-dev/material-theme-docs/1.5.3.1/static/favicon.ico" type="image/x-icon">
10+
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/neko-dev/material-theme-docs@1.5.3.3/static/favicon.ico" type="image/x-icon">
11+
<link rel="icon" href="https://cdn.jsdelivr.net/gh/neko-dev/material-theme-docs@1.5.3.3/static/favicon.ico" type="image/x-icon">
1212
<title>Material Theme</title>
1313
<meta property="og:url" content="https://material.viosey.com">
1414
<meta property="og:type" content="website">
1515
<meta property="og:title" content="Material Theme">
1616
<meta property="og:description" content="Material theme, an elegant & Material Design theme.">
17-
<link rel="stylesheet" href="https://github.elemecdn.com/neko-dev/material-theme-docs/1.5.3.1/static/css/style.css">
17+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/neko-dev/material-theme-docs@1.5.3.3/static/css/style.min.css">
1818
<link rel="stylesheet" href="https://fonts.geekzu.org/css?family=Roboto+Mono|Source+Sans+Pro:300,400,600">
1919
</head>
2020

@@ -61,12 +61,13 @@
6161
autoHeader: true,
6262

6363
// use jsdelivr load markdown file
64-
basePath: 'https://cdn.jsdelivr.net/gh/neko-dev/[email protected]/docs/',
64+
basePath: '/',
6565

6666
//Auto2Top
6767
auto2top: true,
6868
}
6969
</script>
70+
7071
<script src="https://cdnjs.cat.net/ajax/libs/docsify/4.3.6/docsify.min.js"></script>
7172
<script src="https://cdnjs.cat.net/ajax/libs/docsify/4.3.6/plugins/search.min.js"></script>
7273
<script src="https://cdnjs.cat.net/ajax/libs/prism/1.8.1/components/prism-yaml.min.js"></script>

docs/pages.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ layout: links
2222
### 添加数据
2323
同样在在 hexo 目录下的 `source` 文件夹内创建一个名为 `_data`(禁止改名)的文件夹。
2424

25-
然后在文件内创建一个名为 `links.yml` 的文件。
25+
然后在文件内创建一个名为 `links.yaml` 的文件。
2626

2727
单个友情链接的格式为:
2828

29-
```yml
29+
```yaml
3030
Name:
3131
link: http://example.com
3232
avatar: http://example.com/avatar.png
@@ -63,11 +63,11 @@ layout: gallery
6363
### 添加数据
6464
同样在在 hexo 目录下的 `source` 文件夹内创建一个名为 `_data`(禁止改名)的文件夹。
6565

66-
然后在文件内创建一个名为 `gallery.yml` 的文件。
66+
然后在文件内创建一个名为 `gallery.yaml` 的文件。
6767

6868
单个图片的格式为:
6969

70-
```yml
70+
```yaml
7171
Name:
7272
full_link: http://example.com/full-image.png
7373
thumb_link: http://example.com/thumb-image.png

0 commit comments

Comments
 (0)