Skip to content

Commit

Permalink
docs: review
Browse files Browse the repository at this point in the history
  • Loading branch information
kitian616 committed Jun 30, 2018
1 parent 49e5180 commit 1cf02b7
Show file tree
Hide file tree
Showing 25 changed files with 70 additions and 75 deletions.
4 changes: 2 additions & 2 deletions README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ TeXt 是针对个人网站、博客、项目、文档等等的一款 Jekyll 主

## Color Theme

颜色主题位于文件夹 ./\_sass/colors 中,修改 ./\_config.yml 中的 text_color_theme 项为以下值即可更换颜色主题,默认主题为 default。
TeXt 内置以下 6 套颜色主题:

| `default` | `dark` | `forest` |
| --- | --- | --- |
Expand Down Expand Up @@ -65,7 +65,7 @@ TeXt 是针对个人网站、博客、项目、文档等等的一款 Jekyll 主

## 其他资源

./\_includes/icon/social 目录下有很多的社交产品图标,例如 Behance、Flickr、QQ、微信等,方便修改和使用。
*_includes/icon/social* 目录下有很多的社交产品图标,例如 Behance、Flickr、QQ、微信等,方便修改和使用。

## 示例

Expand Down
4 changes: 2 additions & 2 deletions docs/en/1.1-quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions docs/en/1.7-update-form-1-to-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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
Expand Down Expand Up @@ -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:

Expand Down
16 changes: 8 additions & 8 deletions docs/en/2.1-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}

<!--more-->
Expand Down Expand Up @@ -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 |
| --- | --- |
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/en/2.2-navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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*.

<!--more-->

## 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:
Expand Down
6 changes: 3 additions & 3 deletions docs/en/2.3-layouts.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand All @@ -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

Expand Down
6 changes: 3 additions & 3 deletions docs/en/2.4-logo-and-favicon.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ key: docs-logo-and-favicon

## Logo

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

## Favicon

Expand All @@ -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}
Expand All @@ -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 `<!-- begin favicon -->` and `<!-- end favicon -->`.
Download favicon package and unzip it to the path you just set, and replace the HTML code in *_includes/head.html* between `<!-- begin favicon -->` and `<!-- end favicon -->`.
7 changes: 3 additions & 4 deletions docs/en/2.5-authors.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions docs/en/3.1-writing-posts.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<!--more-->

## 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
Expand All @@ -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.
2 changes: 1 addition & 1 deletion docs/en/3.2-markdown-enhancements.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
| --------------- | ----------- |
Expand Down
10 changes: 5 additions & 5 deletions docs/zh/1.1-quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,23 @@ $ git clone [email protected]: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
```
## 设置
这里仅针对主题方式的安装,普通方式安装请跳过。
**这里仅针对主题方式的安装,普通方式安装请跳过。**
Jekyll 主题含有主题默认的布局文件、包含文件和样式表, 但是有些文件,例如页面、数据和配置文件需要手动添加到项目目录中,这样的好处在于将主题的文件和站点的内容和配置隔离开来,方便主题的升级。
Jekyll 主题含有主题默认的布局文件、包含文件和样式表, 但是有些目录(例如*assets*, *_layouts*, *_includes* 以及 *_sass* 目录)需要手动添加到项目目录中,这样的好处在于将主题的文件和站点的内容和配置隔离开来,方便主题的升级。
```bash
├── 404.html
Expand All @@ -83,4 +83,4 @@ Jekyll 集成了一个开发用的服务器,可以让你使用浏览器在本

如果你打算把网站搭建在 GitHub Pages 上,那你所需要做的就是将项目的源码上传到 USERNAME.github.io 源码仓库的 master 分支,GitHub 会自动的编译,几分钟后你就可以通过 **https://USERNAME.github.io** 访问到你的网站了。

如果你的网站是搭建在其他服务器上的,那么你就需要来自己编译了。首先运行命令 `JEKYLL_ENV=production bundle exec jekyll build` 编译你的网站,然后将编译的文件(位于 _site 目录)更新到你的服务器上。
如果你的网站是搭建在其他服务器上的,那么你就需要来自己编译了。首先运行命令 `JEKYLL_ENV=production bundle exec jekyll build` 编译你的网站,然后将编译的文件(位于 *_site* 目录)更新到你的服务器上。
12 changes: 6 additions & 6 deletions docs/zh/1.7-update-form-1-to-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ key: docs-update-form-1-to-2-zh

### Article 布局

“Post 布局”和“page 布局”变更为“Article 布局”。
“Post 布局”和“Page 布局”更名为“Article 布局”。

1.x:

Expand Down Expand Up @@ -56,7 +56,7 @@ defaults:
### Archive 布局
原有的“All 布局”变更为“Archive 布局”。
原有的“All 布局”更名为“Archive 布局”。
1.x:
Expand All @@ -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:

Expand All @@ -105,15 +105,15 @@ paths:

## 许可协议

对于许可协议,你还需要在 _config.yml 中指定使用的许可协议, 默认为 `false` 不显示:
对于许可协议,你还需要在 *_config.yml* 中指定使用的许可协议, 默认为 `false` 不显示:

```yml
license: CC-BY-4.0
```

## 评论

新版对评论、文章点击量和站点统计在 _config.yml 中的配置做了一些变化,主要是增加了 `provider` 属性,并且将对应的提供方变为对应的子配置项。
新版对评论、文章点击量和站点统计在 *_config.yml* 中的配置做了一些变化,主要是增加了 `provider` 属性,并且将对应的提供方变为对应的子配置项。

1.x:

Expand Down Expand Up @@ -175,7 +175,7 @@ analytics:

## 导航

网站右上的导航配置移到了 _data/navigation.yml 中,在新版中整个导航都可以自由定制了。
网站右上的导航配置移到了 *_data/navigation.yml* 中,在新版中整个导航都可以自由定制了。

1.x:

Expand Down
Loading

0 comments on commit 1cf02b7

Please sign in to comment.