From 1cf02b7a82023a20dec764721f7c89a468bbb6cb Mon Sep 17 00:00:00 2001 From: kitian616 Date: Sat, 30 Jun 2018 23:46:52 +0800 Subject: [PATCH] docs: review --- README-zh.md | 4 ++-- docs/en/1.1-quick-start.md | 4 ++-- docs/en/1.7-update-form-1-to-2.md | 6 +++--- docs/en/2.1-configuration.md | 16 ++++++++-------- docs/en/2.2-navigation.md | 4 ++-- docs/en/2.3-layouts.md | 6 +++--- docs/en/2.4-logo-and-favicon.md | 6 +++--- docs/en/2.5-authors.md | 7 +++---- docs/en/3.1-writing-posts.md | 6 +++--- docs/en/3.2-markdown-enhancements.md | 2 +- docs/zh/1.1-quick-start.md | 10 +++++----- docs/zh/1.7-update-form-1-to-2.md | 12 ++++++------ docs/zh/2.1-configuration.md | 15 +++++++-------- docs/zh/2.2-navigation.md | 4 ++-- docs/zh/2.3-layouts.md | 6 +++--- docs/zh/2.4-logo-and-favicon.md | 6 +++--- docs/zh/2.5-authors.md | 9 +++------ docs/zh/3.1-writing-posts.md | 6 +++--- docs/zh/3.2-markdown-enhancements.md | 2 +- test/_posts/2017-04-03-english.md | 2 +- test/_posts/2017-04-12-traditional-chinese.md | 2 +- test/_posts/2017-04-13-simplified-chinese.md | 2 +- test/_posts/2017-05-05-chart.md | 2 +- test/_posts/2017-06-06-mermaid.md | 2 +- test/_posts/2017-07-07-mathjax.md | 4 ++-- 25 files changed, 70 insertions(+), 75 deletions(-) diff --git a/README-zh.md b/README-zh.md index 2177747ecd0..3daf4c17c16 100644 --- a/README-zh.md +++ b/README-zh.md @@ -34,7 +34,7 @@ TeXt 是针对个人网站、博客、项目、文档等等的一款 Jekyll 主 ## Color Theme -颜色主题位于文件夹 ./\_sass/colors 中,修改 ./\_config.yml 中的 text_color_theme 项为以下值即可更换颜色主题,默认主题为 default。 +TeXt 内置以下 6 套颜色主题: | `default` | `dark` | `forest` | | --- | --- | --- | @@ -65,7 +65,7 @@ TeXt 是针对个人网站、博客、项目、文档等等的一款 Jekyll 主 ## 其他资源 -在 ./\_includes/icon/social 目录下有很多的社交产品图标,例如 Behance、Flickr、QQ、微信等,方便修改和使用。 +在 *_includes/icon/social* 目录下有很多的社交产品图标,例如 Behance、Flickr、QQ、微信等,方便修改和使用。 ## 示例 diff --git a/docs/en/1.1-quick-start.md b/docs/en/1.1-quick-start.md index faa42c4d6d2..f41ae36d26c 100644 --- a/docs/en/1.1-quick-start.md +++ b/docs/en/1.1-quick-start.md @@ -34,7 +34,7 @@ If you host your site on GitHub Pages, you can just fork [jekyll-TeXt-theme](htt ### Ruby Gem Method -Add this line to your Jekyll site’s *Gemfile*: +Add this line to your Jekyll site’s Gemfile: ```ruby gem "jekyll-text-theme" @@ -56,7 +56,7 @@ $ bundle install If you install the theme with common method, you can go straight to the next step. But **if you install the theme with ruby gem method, you have to do some extra jobs**. -With gem-based themes, some of the site’s directories (such as the *assets*, *_layouts*, *_includes*, and *_sass* directories) are stored in the theme’s gem, hidden from your immediate view. You need add some files in your Jekyll site directory: +With gem-based themes, some of the site’s directories (such as the *assets*, *_layouts*, *_includes* and *_sass* directories) are stored in the theme’s gem, hidden from your immediate view. You need add some files in your Jekyll site directory: ```bash ├── 404.html diff --git a/docs/en/1.7-update-form-1-to-2.md b/docs/en/1.7-update-form-1-to-2.md index 97761c751fc..3812da001b2 100644 --- a/docs/en/1.7-update-form-1-to-2.md +++ b/docs/en/1.7-update-form-1-to-2.md @@ -72,7 +72,7 @@ layout: archive ## Paths -In order to maintain consistency with the layout naming, TeXt 2 renamed `all.html` to `archive.html`. `base` and `all` variables under `paths` in _config.yml has renamed to `root` and `archive`. +In order to maintain consistency with the layout naming, TeXt 2 renamed `all.html` to `archive.html`. `base` and `all` variables under `paths` in *_config.yml* has renamed to `root` and `archive`. 1.x: @@ -94,7 +94,7 @@ paths: ## License -You need to specify `license` in _config.yml to enable license, witch default to `false`: +You need to specify `license` in *_config.yml* to enable license, witch default to `false`: ```yml license: CC-BY-4.0 @@ -164,7 +164,7 @@ The location of the default logo has changed。the old icon generation tool has ## Navigator -The navigation configuration at the top right of the site has been moved to _data/navigation.yml and the entire navigation is freely customizable in the new version. +The navigation configuration at the top right of the site has been moved to *_data/navigation.yml* and the entire navigation is freely customizable in the new version. 1.x: diff --git a/docs/en/2.1-configuration.md b/docs/en/2.1-configuration.md index bfbdd6d6209..63f7443cf13 100644 --- a/docs/en/2.1-configuration.md +++ b/docs/en/2.1-configuration.md @@ -4,9 +4,9 @@ permalink: /docs/en/configuration key: docs-configuration --- -Jekyll allows you to concoct your sites in any way you can dream up, and it’s thanks to the powerful and flexible configuration options that this is possible. These options can either be specified in a `_config.yml` file placed in your site’s root directory, or can be specified as flags for the jekyll executable in the terminal. +Jekyll allows you to concoct your sites in any way you can dream up, and it’s thanks to the powerful and flexible configuration options that this is possible. These options can either be specified in a *_config.yml* file placed in your site’s root directory, or can be specified as flags for the jekyll executable in the terminal. -For technical reasons, `_config.yml` is *NOT* reloaded automatically when you use `jekyll serve`. If you change this file, please restart the server process. +For technical reasons, *_config.yml* is **NOT** reloaded automatically when you use `jekyll serve`. If you change this file, please restart the server process. {:.warning} @@ -146,9 +146,9 @@ repository: user_name/repo_name ### Excerpt -Each post automatically takes the first block of text, from the beginning of the content to the first occurrence of excerpt_separator, and sets it as the post’s excerpt. +Each post automatically takes the first block of text, from the beginning of the content to the first occurrence of `excerpt_separator`, and sets it as the post’s excerpt. -The post's excerpt is show in the articles list in the home layout. There are two excerpt types: text type and html type: +The post's excerpt is show in the articles list in the home layout. There are two excerpt types, text type and html type. | Type Name | Description | | --- | --- | @@ -203,7 +203,7 @@ Check [Writing Posts](/) for detail usage. ## Paginate -Settings for [Jekyll Paginate](https://github.com/jekyll/jekyll-paginate) plugin. to enable pagination for posts on your blog, add a line to the _config.yml file that specifies how many items should be displayed per page: +Settings for [Jekyll Paginate](https://github.com/jekyll/jekyll-paginate) plugin. to enable pagination for posts on your blog, add a line to the *_config.yml* file that specifies how many items should be displayed per page: ```yaml paginate: 8 @@ -238,7 +238,7 @@ sources: bootcdn # bootcdn (default), unpkg ### Disqus -To use Disqus you’ll need to create an account and [shortname](https://help.disqus.com/customer/portal/articles/466208-what-s-a-shortname-). Once you have both update _config.yml to: +To use Disqus you’ll need to create an account and [shortname](https://help.disqus.com/customer/portal/articles/466208-what-s-a-shortname-). Once you have both update *_config.yml* to: ```yaml comments: @@ -249,7 +249,7 @@ comments: ### Gitalk -To use gitalk you need a GitHub application, if you don't have one, [Click here to register](https://github.com/settings/applications/new) a new one. and then update _config.yml to: +To use gitalk you need a GitHub application, if you don't have one, [Click here to register](https://github.com/settings/applications/new) a new one. and then update *_config.yml* to: ```yaml comments: @@ -289,7 +289,7 @@ pageview: app_class : "your-leanCloud-app-class" ``` -For all the above pageview statistics, you NEED set `key` variable in the page's YAML Front Matter to enable statistics on this page, you can find more information [HRER](https://tianqi.name/jekyll-TeXt-theme/docs/en/layouts#page-layout). +For all the above pageview statistics, you **NEED** set `key` variable in the page's YAML Front Matter to enable statistics on this page, you can find more information [HRER](https://tianqi.name/jekyll-TeXt-theme/docs/en/layouts#page-layout). {:.warning} ## Analytics diff --git a/docs/en/2.2-navigation.md b/docs/en/2.2-navigation.md index 1009fefd3d3..4173fc2eccc 100644 --- a/docs/en/2.2-navigation.md +++ b/docs/en/2.2-navigation.md @@ -4,13 +4,13 @@ permalink: /docs/en/navigation key: docs-navigation --- -There are two types of navigation in TeXt: **Header Navigation** and **Sidebar Navigation**, both are defined in data/navigation.yml. +There are two types of navigation in TeXt: **Header Navigation** and **Sidebar Navigation**, both are defined in *data/navigation.yml*. ## Header Navigation -Header navigation is defined under the `header` key in data/navigation.yml, it is an array of title(s) and url: +Header navigation is defined under the `header` key in *data/navigation.yml*, it is an array of title(s) and url: ```yaml header: diff --git a/docs/en/2.3-layouts.md b/docs/en/2.3-layouts.md index 4ead6dc84a1..637f5f85cab 100644 --- a/docs/en/2.3-layouts.md +++ b/docs/en/2.3-layouts.md @@ -38,7 +38,7 @@ Base on Base Layout. | **lang** | en | Language of this page | | **show_header** | true (default), false | Set as `false` to hide header on this page | | **show_title** | true (default), false | Set as `false` to hide title on this page | -| **show_edit_on_github** | true, false (default) | Set as `true` to show "Edit on Github" button. you need set `repository` and `repository_tree` in _config.yml first | +| **show_edit_on_github** | true, false (default) | Set as `true` to show "Edit on Github" button. you need set `repository` and `repository_tree` in *_config.yml* first | | **full_width** | true, false (default) | Set as `true` to make main full width on this page | | **comment** | true (default), false | Set as `false` to disable comment on this page | | **mathjax** | true, false (default) | Set as `true` to enable Mathjax on this page | @@ -54,9 +54,9 @@ Base on Page Layout. | Variable | Option Values | Description | | **modify_date** | - | The last modified date of this article, the date is modified in the format `YYYY-MM-DD HH:MM:SS +/-TTTT`; hours, minutes, seconds, and timezone offset are optional. just like `date` variable | -| **author** | - | Assign one of the authors in authors.yml to a post or page, see [Authors](https://tianqi.name/jekyll-TeXt-theme/docs/en/authors) for detail | +| **author** | - | Assign one of the authors in *authors.yml* to a post or page, see [Authors](https://tianqi.name/jekyll-TeXt-theme/docs/en/authors) for detail | | **show_author_profile** | true, false (default) | Set as `true` to show author profile at the beginning of the article | -| **license** | true, false, "CC-BY-4.0", "CC-BY-SA-4.0", "CC-BY-NC-4.0", "CC-BY-ND-4.0" | license of the article. Set true to use `license` variable setted in _config.yml, set false to enable it | +| **license** | true, false, "CC-BY-4.0", "CC-BY-SA-4.0", "CC-BY-NC-4.0", "CC-BY-ND-4.0" | license of the article. Set true to use `license` variable setted in *_config.yml*, set false to enable it | ## Home Layout diff --git a/docs/en/2.4-logo-and-favicon.md b/docs/en/2.4-logo-and-favicon.md index 2b54ef20cb4..7058f1724e4 100644 --- a/docs/en/2.4-logo-and-favicon.md +++ b/docs/en/2.4-logo-and-favicon.md @@ -6,7 +6,7 @@ key: docs-logo-and-favicon ## Logo -

TeXt use {% include svg/logo.svg %} as logo, you can change it by replacing _includes/svg/logo.svg with your own logo.

+

TeXt use {% include svg/logo.svg %} as logo, you can change it by replacing _includes/svg/logo.svg with your own logo.

## Favicon @@ -16,7 +16,7 @@ Open [RealFaviconGenerator](https://realfavicongenerator.net/), click "Select yo ![Select your Favicon picture](https://raw.githubusercontent.com/kitian616/jekyll-TeXt-theme/master/docs/assets/images/realfavicongenerator-select-favicon-picture.jpg) -After settings you need tell the generator where you would place favicon files, TeXt default put them to `/assets`. +After settings you need tell the generator where you would place favicon files, TeXt default put them to */assets*. It's recommended to put favicon files at the root of your site. {:.warning} @@ -27,4 +27,4 @@ If all are done, just click "Generate your Favicons and HTML code" to the last s ![Result](https://raw.githubusercontent.com/kitian616/jekyll-TeXt-theme/master/docs/assets/images/realfavicongenerator-result.jpg) -Download favicon package and unzip it to the path you just set, and replace the HTML code in _includes/head.html between `` and ``. \ No newline at end of file +Download favicon package and unzip it to the path you just set, and replace the HTML code in *_includes/head.html* between `` and ``. \ No newline at end of file diff --git a/docs/en/2.5-authors.md b/docs/en/2.5-authors.md index 3084874a4df..aea04ed17f8 100644 --- a/docs/en/2.5-authors.md +++ b/docs/en/2.5-authors.md @@ -3,10 +3,9 @@ title: Authors permalink: /docs/en/authors key: docs-authors --- +By default all the posts or pages are authored by `author` that configured in *_config.yml*, but you can overwrite it in the page's YAML Front Mater. -By default all the posts or pages are authored by `author` that configured in _config.yml, but you can overwrite it in the page's YAML Front Mater. - -Todo so, you need create _data/authors.yml and add authors using the following format. Any variables found under `author` in _config.yml can be used (type, name, url, avatar, bio, email, facebook etc.). +Todo so, you need create *_data/authors.yml* and add authors using the following format. Any variables found under `author` in *_config.yml* can be used (type, name, url, avatar, bio, email, facebook etc.). ```yml Tian Qi: @@ -21,7 +20,7 @@ Tian Qi: weibo : 234695683 ``` -Assign one of the authors in authors.yml to a post or page you wish to override the site.author with. +Assign one of the authors in *authors.yml* to a post or page you wish to override the `site.author` with. --- author: Tian Qi diff --git a/docs/en/3.1-writing-posts.md b/docs/en/3.1-writing-posts.md index 81f362f1a4e..d94fb230723 100644 --- a/docs/en/3.1-writing-posts.md +++ b/docs/en/3.1-writing-posts.md @@ -4,13 +4,13 @@ permalink: /docs/en/writing-posts key: docs-writing-posts --- -As explained on the [directory structure](https://jekyllrb.com/docs/structure/) page, **the _posts folder is where your blog posts will live**. These files are generally Markdown or HTML. All posts must have YAML Front Matter, and they will be converted from their source format into an HTML page that is part of your static site. +As explained on the [directory structure](https://jekyllrb.com/docs/structure/) page, **the */_posts* folder is where your blog posts will live**. These files are generally Markdown or HTML. All posts must have YAML Front Matter, and they will be converted from their source format into an HTML page that is part of your static site. ## Creating Post Files -To create a new post, all you need to do is create a file in the `_posts` directory. Jekyll requires blog post files to be named like these: +To create a new post, all you need to do is create a file in the */_posts* directory. Jekyll requires blog post files to be named like these: 2011-12-31-new-years-eve-is-awesome.md 2012-09-12-how-to-write-a-blog.markdown @@ -29,6 +29,6 @@ To improve the user experience for both reading and writing posts, TeXt made som mathjax: true --- -Between these triple-dashed lines you can set variables. you can consider it as page configuration, these would overrides the global configuration in ``_config.yml``. +Between these triple-dashed lines you can set variables. you can consider it as page configuration, these would overrides the global configuration in *_config.yml*. Beside Jekyll's predefined variables, TeXt define some new variables for each layouts, see [Layouts](https://tianqi.name/jekyll-TeXt-theme/docs/en/layouts) for details. \ No newline at end of file diff --git a/docs/en/3.2-markdown-enhancements.md b/docs/en/3.2-markdown-enhancements.md index a0bc3a10e6c..f8155a043cb 100644 --- a/docs/en/3.2-markdown-enhancements.md +++ b/docs/en/3.2-markdown-enhancements.md @@ -4,7 +4,7 @@ permalink: /docs/en/markdown-enhancements key: docs-markdown-enhancements --- -You need set the variable true in the `_config.yml` or in the YAML Front Matter to enable markdown enhancement. +You need set the variable true in the *_config.yml* or in the YAML Front Matter to enable markdown enhancement. | Enhancemen Name | Description | | --------------- | ----------- | diff --git a/docs/zh/1.1-quick-start.md b/docs/zh/1.1-quick-start.md index c54c09975af..1d01f7a0afe 100644 --- a/docs/zh/1.1-quick-start.md +++ b/docs/zh/1.1-quick-start.md @@ -40,13 +40,13 @@ $ git clone git@github.com:kitian616/jekyll-TeXt-theme.git gem "jekyll-text-theme" ``` -执行命令行 bundle install 来安装主题。 +执行命令行 `bundle install` 来安装主题。 ```bash $ bundle install ``` -最后, 向站点的 _config.yml 中加入下列代码来启用主题: +最后, 向站点的 *_config.yml* 中加入下列代码来启用主题: ```yaml theme: jekyll-text-theme @@ -54,9 +54,9 @@ theme: jekyll-text-theme ## 设置 -这里仅针对主题方式的安装,普通方式安装请跳过。 +**这里仅针对主题方式的安装,普通方式安装请跳过。** -Jekyll 主题含有主题默认的布局文件、包含文件和样式表, 但是有些文件,例如页面、数据和配置文件需要手动添加到项目目录中,这样的好处在于将主题的文件和站点的内容和配置隔离开来,方便主题的升级。 +Jekyll 主题含有主题默认的布局文件、包含文件和样式表, 但是有些目录(例如*assets*, *_layouts*, *_includes* 以及 *_sass* 目录)需要手动添加到项目目录中,这样的好处在于将主题的文件和站点的内容和配置隔离开来,方便主题的升级。 ```bash ├── 404.html @@ -83,4 +83,4 @@ Jekyll 集成了一个开发用的服务器,可以让你使用浏览器在本 如果你打算把网站搭建在 GitHub Pages 上,那你所需要做的就是将项目的源码上传到 USERNAME.github.io 源码仓库的 master 分支,GitHub 会自动的编译,几分钟后你就可以通过 **https://USERNAME.github.io** 访问到你的网站了。 -如果你的网站是搭建在其他服务器上的,那么你就需要来自己编译了。首先运行命令 `JEKYLL_ENV=production bundle exec jekyll build` 编译你的网站,然后将编译的文件(位于 _site 目录)更新到你的服务器上。 \ No newline at end of file +如果你的网站是搭建在其他服务器上的,那么你就需要来自己编译了。首先运行命令 `JEKYLL_ENV=production bundle exec jekyll build` 编译你的网站,然后将编译的文件(位于 *_site* 目录)更新到你的服务器上。 \ No newline at end of file diff --git a/docs/zh/1.7-update-form-1-to-2.md b/docs/zh/1.7-update-form-1-to-2.md index a8fecf886de..b6ab38c619d 100644 --- a/docs/zh/1.7-update-form-1-to-2.md +++ b/docs/zh/1.7-update-form-1-to-2.md @@ -10,7 +10,7 @@ key: docs-update-form-1-to-2-zh ### Article 布局 -“Post 布局”和“page 布局”变更为“Article 布局”。 +“Post 布局”和“Page 布局”更名为“Article 布局”。 1.x: @@ -56,7 +56,7 @@ defaults: ### Archive 布局 -原有的“All 布局”变更为“Archive 布局”。 +原有的“All 布局”更名为“Archive 布局”。 1.x: @@ -83,7 +83,7 @@ paths: ## Paths -为了保持和布局命名的一致性,新版将原有的 `all.html` 更名为 `archive.html`。_config.yml 中 `paths` 的配置项 `base` 和 `all` 分别更名为 `root` 和 `archive`。 +为了保持和布局命名的一致性,新版将原有的 `all.html` 更名为 `archive.html`。*_config.yml* 中 `paths` 的配置项 `base` 和 `all` 分别更名为 `root` 和 `archive`。 1.x: @@ -105,7 +105,7 @@ paths: ## 许可协议 -对于许可协议,你还需要在 _config.yml 中指定使用的许可协议, 默认为 `false` 不显示: +对于许可协议,你还需要在 *_config.yml* 中指定使用的许可协议, 默认为 `false` 不显示: ```yml license: CC-BY-4.0 @@ -113,7 +113,7 @@ license: CC-BY-4.0 ## 评论 -新版对评论、文章点击量和站点统计在 _config.yml 中的配置做了一些变化,主要是增加了 `provider` 属性,并且将对应的提供方变为对应的子配置项。 +新版对评论、文章点击量和站点统计在 *_config.yml* 中的配置做了一些变化,主要是增加了 `provider` 属性,并且将对应的提供方变为对应的子配置项。 1.x: @@ -175,7 +175,7 @@ analytics: ## 导航 -网站右上的导航配置移到了 _data/navigation.yml 中,在新版中整个导航都可以自由定制了。 +网站右上的导航配置移到了 *_data/navigation.yml* 中,在新版中整个导航都可以自由定制了。 1.x: diff --git a/docs/zh/2.1-configuration.md b/docs/zh/2.1-configuration.md index ceb9b7301df..64b0b26ea78 100644 --- a/docs/zh/2.1-configuration.md +++ b/docs/zh/2.1-configuration.md @@ -4,9 +4,9 @@ permalink: /docs/zh/configuration key: docs-configuration-zh --- -Jekyll 允许你很轻松的设计你的网站,这很大程度上归功于灵活强大的配置功能。既可以配置在网站根目录下的 `_config.yml` 文件,也可以作为命令行的标记来配置。 +Jekyll 允许你很轻松的设计你的网站,这很大程度上归功于灵活强大的配置功能。既可以配置在网站根目录下的 *_config.yml* 文件,也可以作为命令行的标记来配置。 -`_config.yml` 包括一些在运行时一次性读入的全局配置和变量定义, 在自动生成的过程中并不会重新加载,除非重新运行。注意 Data Files 包括在自动生成范围内,可以在更改后自动重新加载。 +*_config.yml* 包括一些在运行时一次性读入的全局配置和变量定义, 在自动生成的过程中并**不会**重新加载,除非重新运行。注意 Data Files 包括在自动生成范围内,可以在更改后自动重新加载。 {:.warning} @@ -144,7 +144,7 @@ repository: user_name/repo_name ### 摘要 -该主题的摘要有两种模式——TEXT 模式和 HTML 模式。 当 ./\_config.yml 配置项 `excerpt_type` 的值为 `text` 时是 TEXT 模式,为 `html` 时是 HTML 模式,**默认为 TEXT 模式**。 +该主题的摘要有两种模式——TEXT 模式和 HTML 模式。 当 *_config.yml* 配置项 `excerpt_type` 的值为 `text` 时是 TEXT 模式,为 `html` 时是 HTML 模式,**默认为 TEXT 模式**。 | 模式名称 | 描述 | | --- | --- | @@ -201,7 +201,7 @@ chart: true [Jekyll Paginate](https://github.com/jekyll/jekyll-paginate) 插件的配置。 -要想对文章列表做分页,你需要在 _config.yml 文件中配置每页显示的文章数: +要想对文章列表做分页,你需要在 *_config.yml* 文件中配置每页显示的文章数: ```yaml paginate: 8 @@ -236,7 +236,7 @@ sources: bootcdn # bootcdn (default), unpkg ### Disqus -要想启用 disqus 作为评论系统,你需要注册一个 Disqus 账号然后申请一个针对该网站的 [shortname](https://help.disqus.com/customer/portal/articles/466208-what-s-a-shortname-),完成后将 shortname 填入到 _config.yml 中: +要想启用 disqus 作为评论系统,你需要注册一个 Disqus 账号然后申请一个针对该网站的 [shortname](https://help.disqus.com/customer/portal/articles/466208-what-s-a-shortname-),完成后将 shortname 填入到 *_config.yml* 中: ```yaml comments: @@ -247,7 +247,7 @@ comments: ### Gitalk -要想启用 gitalk 作为评论系统,首先你需要一个 GitHub Application,如果没有[点击这里](https://github.com/settings/applications/new)申请。然后将相应的参数添加到 _config.yml 配置中: +要想启用 gitalk 作为评论系统,首先你需要一个 GitHub Application,如果没有[点击这里](https://github.com/settings/applications/new)申请。然后将相应的参数添加到 *_config.yml* 配置中: ```yaml comments: @@ -271,8 +271,7 @@ comments: | --- | --- | | **leancloud** | [Disqus](https://leancloud.cn/) | - -TeXt 使用 LeanCloud 作为点击量功能的后台服务。你需要建立一个应用,然后在应用中建立一个 Class,之后将必要的信息填写到 _config.yml 文件中。下面详细介绍其操作步骤。 +TeXt 使用 LeanCloud 作为点击量功能的后台服务。你需要建立一个应用,然后在应用中建立一个 Class,之后将必要的信息填写到 *_config.yml* 文件中。下面详细介绍其操作步骤。 在进入[主页](https://leancloud.cn/)后点击页面右上角的“访问控制台”,然后注册账号并登录。 diff --git a/docs/zh/2.2-navigation.md b/docs/zh/2.2-navigation.md index 8a726bcb917..950a50cc1a0 100644 --- a/docs/zh/2.2-navigation.md +++ b/docs/zh/2.2-navigation.md @@ -4,13 +4,13 @@ permalink: /docs/zh/navigation key: docs-navigation-zh --- -在 TeXt 中有两种导航栏:**头部导航栏**(Header Navigation)和**侧边栏导航栏**(Sidebar Navigation),它们均在 data/navigation.yml 中配置。 +在 TeXt 中有两种导航栏:**头部导航栏**(Header Navigation)和**侧边栏导航栏**(Sidebar Navigation),它们均在 *data/navigation.yml* 中配置。 ## 头部导航栏 -头部导航栏在 data/navigation.yml 文件的 `header` 项定义,它是一个包含标题和 URL 项的数组: +头部导航栏在 *data/navigation.yml* 文件的 `header` 项定义,它是一个包含标题和 URL 项的数组: ```yaml header: diff --git a/docs/zh/2.3-layouts.md b/docs/zh/2.3-layouts.md index 6d9ad09d47b..73c79279b93 100644 --- a/docs/zh/2.3-layouts.md +++ b/docs/zh/2.3-layouts.md @@ -38,7 +38,7 @@ graph TB; | **lang** | en | 该页的语言 | | **show_header** | true (default), false | 该页是否显示 Header, 设置为 `false` 隐藏 | | **show_title** | true (default), false | 该页是否显示标题,默认显示,设置为 `false` 隐藏 | -| **show_edit_on_github** | true, false (default) | 该页是否显示“在 Github 上修改”按钮,设置为 `true` 显示。你需要先在 _config.yml 中设置 `repository` 和 `repository_tree` | +| **show_edit_on_github** | true, false (default) | 该页是否显示“在 Github 上修改”按钮,设置为 `true` 显示。你需要先在 *_config.yml* 中设置 `repository` 和 `repository_tree` | | **full_width** | true, false (default) | 该页内容是否占据全部宽度,设置为 `true` 开启 | | **comment** | true (default), false | 该页是否开启评论支持,默认开启,设置为 `false` 关闭 | | **mathjax** | true, false (default) | 该页是否开启 Mathjax 公式支持,默认关闭,设置为 `true` 开启 | @@ -54,9 +54,9 @@ graph TB; | Variable | Option Values | Description | | **modify_date** | - | 该文章的最后修改时间, 其格式为 `YYYY-MM-DD HH:MM:SS +/-TTTT` 和 `date` 的格式相同 | -| **author** | - | 将在 authors.yml 中定义的作者作为某篇文章或页面的作者, 详情请看[作者](https://tianqi.name/jekyll-TeXt-theme/docs/zh/authors) | +| **author** | - | 将在 *authors.yml* 中定义的作者作为某篇文章或页面的作者, 详情请看[作者](https://tianqi.name/jekyll-TeXt-theme/docs/zh/authors) | | **show_author_profile** | true, false (default) | 是否在文章开头显示作者信息卡片,设置为 `true` 显示 | -| **license** | true, false, "CC-BY-4.0", "CC-BY-SA-4.0", "CC-BY-NC-4.0", "CC-BY-ND-4.0" | 该文章的许可协议。设置为 `true` 使用在 _config.yml 中设置的 `license` 值,设置为 `false` 不使用许可协议 | +| **license** | true, false, "CC-BY-4.0", "CC-BY-SA-4.0", "CC-BY-NC-4.0", "CC-BY-ND-4.0" | 该文章的许可协议。设置为 `true` 使用在 *_config.yml* 中设置的 `license` 值,设置为 `false` 不使用许可协议 | ## Home 布局 diff --git a/docs/zh/2.4-logo-and-favicon.md b/docs/zh/2.4-logo-and-favicon.md index 208291eb74a..a5bba68b672 100644 --- a/docs/zh/2.4-logo-and-favicon.md +++ b/docs/zh/2.4-logo-and-favicon.md @@ -6,7 +6,7 @@ key: docs-logo-and-favicon-zh ## Logo -

TeXt 使用 {% include svg/logo.svg %} 作为它的 Logo,你可以通过替换 _includes/svg/logo.svg 来设置你的 Logo。

+

TeXt 使用 {% include svg/logo.svg %} 作为它的 Logo,你可以通过替换 _includes/svg/logo.svg 来设置你的 Logo。

## Favicon @@ -16,7 +16,7 @@ TeXt 推荐使用 [RealFaviconGenerator](https://realfavicongenerator.net/) 来 ![Select your Favicon picture](https://raw.githubusercontent.com/kitian616/jekyll-TeXt-theme/master/docs/assets/images/realfavicongenerator-select-favicon-picture.jpg) -图标设置完成后,你需要告诉生成器 Favicon 文件的网站路径,TeXt 将他们放在了 /assets 目录。 +图标设置完成后,你需要告诉生成器 Favicon 文件的网站路径,TeXt 将他们放在了 */assets* 目录。 推荐将 Favicon 文件放在网站的根目录下。 {:.warning} @@ -27,4 +27,4 @@ TeXt 推荐使用 [RealFaviconGenerator](https://realfavicongenerator.net/) 来 ![Result](https://raw.githubusercontent.com/kitian616/jekyll-TeXt-theme/master/docs/assets/images/realfavicongenerator-result.jpg) -下载生成的 favicon 包,解压文件到你方才填写的路径,将 HTML 代码替换到 _includes/head.html 文件 `` 和 `` 之间的地方。 \ No newline at end of file +下载生成的 favicon 包,解压文件到你方才填写的路径,将 HTML 代码替换到 *_includes/head.html* 文件 `` 和 `` 之间的地方。 \ No newline at end of file diff --git a/docs/zh/2.5-authors.md b/docs/zh/2.5-authors.md index 0346c4e417e..7ba34971ecd 100644 --- a/docs/zh/2.5-authors.md +++ b/docs/zh/2.5-authors.md @@ -3,12 +3,9 @@ title: Authors permalink: /docs/zh/authors key: docs-authors-zh --- +文章或页面的作者默认为在 *_config.yml* 中配置的 `author`,当然你可以通过 YAML 头信息来指定特定文章的作者。 -By default all the posts are authored by `author` that configured in _config.yml, but you can overwrite it in the page's YAML Front Mater. - -文章或页面的作者默认为在 _config.yml 中配置的 `author`,当然你可以通过 YAML 头信息来指定特定文章的作者。 - -首先你需要有一个 _data/authors.yml 的文件,参考以下格式来增加作者信息。其可用参数和 _config.yml 中的 `author` 项的参数一致(type, name, url, avatar, bio, email, facebook 等)。 +首先你需要有一个 *_data/authors.yml* 的文件,参考以下格式来增加作者信息。其可用参数和 *_config.yml* 中的 `author` 项的参数一致(type, name, url, avatar, bio, email, facebook 等)。 ```yml Tian Qi: @@ -23,7 +20,7 @@ Tian Qi: weibo : 234695683 ``` -将在 authors.yml 中定义的作者作为某篇文章或页面的作者以覆盖 site.author 全局作者。 +将在 *authors.yml* 中定义的作者作为某篇文章或页面的作者以覆盖 `site.author` 全局作者。 --- author: Tian Qi diff --git a/docs/zh/3.1-writing-posts.md b/docs/zh/3.1-writing-posts.md index 73ab83c8049..6bfc4d80a28 100644 --- a/docs/zh/3.1-writing-posts.md +++ b/docs/zh/3.1-writing-posts.md @@ -4,13 +4,13 @@ permalink: /docs/zh/writing-posts key: docs-writing-posts-zh --- -在[目录结构](http://jekyllcn.com/docs/structure/)介绍中说明过,**所有的文章都在 _posts 文件夹中**。这些文件可以用 Markdown 或 HTML 编写。只要文件中有 YAML 头信息,它们就会从源格式转化成 HTML 页面,从而成为你的静态网站的一部分。 +在[目录结构](http://jekyllcn.com/docs/structure/)介绍中说明过,**所有的文章都在 */_posts* 文件夹中**。这些文件可以用 Markdown 或 HTML 编写。只要文件中有 YAML 头信息,它们就会从源格式转化成 HTML 页面,从而成为你的静态网站的一部分。 ## 创建文章 -发表一篇新文章,你所需要做的就是在 `_posts` 文件夹中创建一个新的文件。文件名的命名非常重要。Jekyll 要求一篇文章的文件名遵循下面的格式: +发表一篇新文章,你所需要做的就是在 */_posts* 文件夹中创建一个新的文件。文件名的命名非常重要。Jekyll 要求一篇文章的文件名遵循下面的格式: 年-月-日-标题.MARKUP @@ -33,6 +33,6 @@ key: docs-writing-posts-zh mathjax: true --- -在 `---` 之间你可以设置属性的值,可以把它们看作页面的配置,这些配置会覆盖在 `_config.yml` 文件中设置的全局配置。 +在 `---` 之间你可以设置属性的值,可以把它们看作页面的配置,这些配置会覆盖在 *_config.yml* 文件中设置的全局配置。 除去 Jekyll 自定义的变量外,TeXt 也定义了一些额外的变量,详情请戳[布局](https://tianqi.name/jekyll-TeXt-theme/docs/zh/layouts)。 \ No newline at end of file diff --git a/docs/zh/3.2-markdown-enhancements.md b/docs/zh/3.2-markdown-enhancements.md index 9838d078709..033324d769a 100644 --- a/docs/zh/3.2-markdown-enhancements.md +++ b/docs/zh/3.2-markdown-enhancements.md @@ -4,7 +4,7 @@ permalink: /docs/zh/markdown-enhancements key: docs-markdown-enhancements-zh --- -你需要在 `_config.yml` 或 YAML 头信息中设置相关的属性为 `true` 来开启对应的功能。 +你需要在 *_config.yml* 或 YAML 头信息中设置相关的属性为 `true` 来开启对应的功能。 | 增强项 | 描述 | | --------------- | ----------- | diff --git a/test/_posts/2017-04-03-english.md b/test/_posts/2017-04-03-english.md index 846157584de..cb500f8b165 100644 --- a/test/_posts/2017-04-03-english.md +++ b/test/_posts/2017-04-03-english.md @@ -7,7 +7,7 @@ tags: lang: en --- -English is the default language of TeXt, if you set `lang` in _config.yml to the other language but want make the page English, just set `lang: en` in the front matter. +English is the default language of TeXt, if you set `lang` in *_config.yml* to the other language but want make the page English, just set `lang: en` in the front matter. diff --git a/test/_posts/2017-04-12-traditional-chinese.md b/test/_posts/2017-04-12-traditional-chinese.md index 7aed9ad9750..7caba509e7d 100644 --- a/test/_posts/2017-04-12-traditional-chinese.md +++ b/test/_posts/2017-04-12-traditional-chinese.md @@ -7,7 +7,7 @@ tags: lang: zh-Hant --- -在 _config.yml 或者頭信息裏設置 `lang: zh-Hant` 後,主題文字變為繁體中文。 +在 *_config.yml* 或者頭信息裏設置 `lang: zh-Hant` 後,主題文字變為繁體中文。 diff --git a/test/_posts/2017-04-13-simplified-chinese.md b/test/_posts/2017-04-13-simplified-chinese.md index a24e1235aec..feb3ac59f30 100644 --- a/test/_posts/2017-04-13-simplified-chinese.md +++ b/test/_posts/2017-04-13-simplified-chinese.md @@ -7,7 +7,7 @@ tags: lang: zh-Hans --- -在 _config.yml 或者头信息里设置 `lang: zh-Hans` 或 `lang: zh` 后,主题文字变为简体中文。 +在 *_config.yml* 或者头信息里设置 `lang: zh-Hans` 或 `lang: zh` 后,主题文字变为简体中文。 diff --git a/test/_posts/2017-05-05-chart.md b/test/_posts/2017-05-05-chart.md index ce060fcbb1d..a6546c974eb 100644 --- a/test/_posts/2017-05-05-chart.md +++ b/test/_posts/2017-05-05-chart.md @@ -59,7 +59,7 @@ chart: true -You need set `chart: true` in the _config.yml or the markdown's front matter to **enable** it. +You need set `chart: true` in the *_config.yml* or the markdown's front matter to **enable** it. {:.warning} ## Line Chart diff --git a/test/_posts/2017-06-06-mermaid.md b/test/_posts/2017-06-06-mermaid.md index 34a8b4700ca..3640581a15d 100644 --- a/test/_posts/2017-06-06-mermaid.md +++ b/test/_posts/2017-06-06-mermaid.md @@ -20,7 +20,7 @@ graph TB; -You need set `mermaid: true` in the _config.yml or the markdown's front matter to **enable** it. +You need set `mermaid: true` in the *_config.yml* or the markdown's front matter to **enable** it. {:.warning} Generation of diagrams and flowcharts from text in a similar manner as markdown. diff --git a/test/_posts/2017-07-07-mathjax.md b/test/_posts/2017-07-07-mathjax.md index e87512899a1..ee0fa6386f4 100644 --- a/test/_posts/2017-07-07-mathjax.md +++ b/test/_posts/2017-07-07-mathjax.md @@ -16,10 +16,10 @@ $$x_2 = {-b - \sqrt{b^2-4ac} \over 2a} \notag$$ -You need set `mathjax: true` in the _config.yml or the markdown's front matter to **enable** it. +You need set `mathjax: true` in the *_config.yml* or the markdown's front matter to **enable** it. {:.warning} -**After MathJax enabled**, you can set `mathjax_autoNumber: true` to have equations be numbered automatically, You can use \notag or \nonumber to prevent individual equations from being numbered. +**After MathJax enabled**, you can set `mathjax_autoNumber: true` to have equations be numbered automatically, You can use `\notag` or `\nonumber` to prevent individual equations from being numbered. {:.info} **markdown:**