From 717a501c36bb43c0245f940b650b5cee6c19a2c1 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Fri, 21 Aug 2020 22:41:48 +0800 Subject: [PATCH] Update the docs. - Optimize the code style of markdown list - Increase post contents (#104, #100) --- README.md | 71 +++++++++++------------- _posts/2019-08-08-text-and-typography.md | 20 ++++++- _posts/2019-08-08-write-a-new-post.md | 10 ++++ _posts/2019-08-09-getting-started.md | 22 +++++--- docs/README_zh-CN.md | 65 +++++++++++----------- 5 files changed, 109 insertions(+), 79 deletions(-) diff --git a/README.md b/README.md index 8f729ab..ebaf8bb 100644 --- a/README.md +++ b/README.md @@ -13,31 +13,30 @@ A minimal, sidebar, responsive web design Jekyll theme, focusing on text present ## Table of Contents -* [Features](#features) -* [Installation](#installation) -* [Usage](#usage) -* [Contributing](#contributing) -* [Credits](#credits) -* [Support](#support) -* [License](#license) +- [Features](#features) +- [Installation](#installation) +- [Usage](#usage) +- [Contributing](#contributing) +- [Credits](#credits) +- [Support](#support) +- [License](#license) ## Features -* Pinned Posts -* Configurable theme mode -* Double-level Categories -* Last modified date for posts -* Table of Contents -* Automatically recommend related posts -* Syntax highlighting -* Mathematical expressions -* Search -* Atom Feeds -* Disqus Comments -* Google Analytics -* GA Pageviews reporting (Advanced) -* SEO and Performance Optimization - +- Pinned Posts +- Configurable theme mode +- Double-level Categories +- Last modified date for posts +- Table of Contents +- Automatically recommend related posts +- Syntax highlighting +- Mathematical expressions +- Search +- Atom Feeds +- Disqus Comments +- Google Analytics +- GA Pageviews reporting (Advanced) +- SEO and Performance Optimization ## Installation @@ -49,7 +48,7 @@ $ git clone git@github.com:/jekyll-theme-chirpy -b master --single-bra ### Setting up the local envrionment -If you would like to run or build the project on your local machine, please follow the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of `Ruby`, `RubyGems` and `Bundler`. +If you would like to run or build the project on your local machine, please follow the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of `Ruby`, `RubyGems` and `Bundler`. Before running or building for the first time, please complete the installation of the Jekyll plugins. Go to the root directory of project and run: @@ -61,19 +60,18 @@ $ bundle install What's more, in order to generate some extra files (*categories*, *tags* and *last modified list*), we need to use some tool scripts. If your machine is running Debian or macOS, make sure that [GNU coreutils](https://www.gnu.org/software/coreutils/) is installed. Otherwise, install by: -* Debian +- Debian ```console $ sudo apt-get install coreutils ``` -* macOS +- macOS ```console $ brew install coreutils ``` - ## Usage Running [**Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/) requires some extra files, which cannot be generated by Jekyll native commands, so please strictly follow the methods mentioned below to run or deploy your website. @@ -91,11 +89,12 @@ $ bash tools/init.sh What it does is: 1. Remove some files or directories from your repository: - * `.travis.yml` - * files under `_posts` - * folder `docs` -2. If you use the `--no-gh` option, the directory `.github` will be deleted. Otherwise, setup the GitHub Action workflow by removing extension `.hook` of `.github/workflows/pages-deploy.yml.hook`, and then remove the other files and directories in folder `.github`. + - `.travis.yml` + - files under `_posts` + - folder `docs` + +2. If you use the `--no-gh` option, the directory `.github` will be deleted. Otherwise, setup the GitHub Action workflow by removing extension `.hook` of `.github/workflows/pages-deploy.yml.hook`, and then remove the other files and directories in folder `.github`. 3. Automatically create a commit to save the changes. @@ -103,11 +102,10 @@ What it does is: Generally, go to `_config.yml` and configure the variables as needed. Some of them are typical options: -* `url` -* `avatar` -* `timezone` -* `theme_mode` - +- `url` +- `avatar` +- `timezone` +- `theme_mode` ### Run Locally @@ -177,19 +175,16 @@ For more details and the better reading experience, please check out the [tutori The old saying, "Two heads are better than one." Consequently, welcome to report bugs, improve code quality or submit a new feature. For more information, see [contributing guidelines](.github/CONTRIBUTING.md). - ## Credits This theme is mainly built with [Jekyll](https://jekyllrb.com/) ecosystem, [Bootstrap](https://getbootstrap.com/), [Font Awesome](https://fontawesome.com/) and some other wonderful tools (their copyright information can be found in the relevant files). :tada: Thanks to all the volunteers who contributed to this project, their GitHub IDs are on [this list](https://github.com/cotes2020/jekyll-theme-chirpy/graphs/contributors). Also, I won't forget those guys who submitted the issues or unmerged PR because they reported bugs, shared ideas or inspired me to write more readable documentation. - ## Support If you enjoy this theme or find it helpful, please consider becoming my sponsor, I'd really appreciate it! Click the button :heart: Sponsor at the top of the [Home Page](https://github.com/cotes2020/jekyll-theme-chirpy) and choose a link that suits you to donate; this will encourage and help me better maintain the project. - ## License This work is published under [MIT](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE) License. \ No newline at end of file diff --git a/_posts/2019-08-08-text-and-typography.md b/_posts/2019-08-08-text-and-typography.md index f06580c..211d517 100644 --- a/_posts/2019-08-08-text-and-typography.md +++ b/_posts/2019-08-08-text-and-typography.md @@ -5,9 +5,11 @@ date: 2019-08-08 11:33:00 +0800 categories: [Blogging, Demo] tags: [typography] math: true +image: /assets/img/sample/devices-mockup.png --- -This Jekyll template totally compatible with Markdown syntax. Now, let's take a look for the text and typography in here. +This Jekyll template totally compatible with Markdown syntax. Now, let's have a look at the text and typography. + ## Titles @@ -37,6 +39,22 @@ Beside the lake, beneath the trees, Fluttering and dancing in the breeze. +## List + +### Ordered list + +1. first item +2. second item +3. third item + +### Unordered list + +- item 1 + - sub item 1 + - sub item 2 + +- item 2 + ## Block Quote > This line to shows the Block Quote. diff --git a/_posts/2019-08-08-write-a-new-post.md b/_posts/2019-08-08-write-a-new-post.md index 465d44b..db0a601 100644 --- a/_posts/2019-08-08-write-a-new-post.md +++ b/_posts/2019-08-08-write-a-new-post.md @@ -124,6 +124,16 @@ math: true --- ``` +## Preview Image + +If you want to add an image to the top of the post contents, specify the url for the image by: + +```yaml +--- +image: /path/to/image-file +--- +``` + ## Pinned Posts diff --git a/_posts/2019-08-09-getting-started.md b/_posts/2019-08-09-getting-started.md index fdc386d..35a2c1f 100644 --- a/_posts/2019-08-09-getting-started.md +++ b/_posts/2019-08-09-getting-started.md @@ -30,13 +30,13 @@ $ bundle install What's more, in order to generate some extra files (*categories*, *tags* and *last modified list*), we need to use some tool scripts. If your machine is running Debian or macOS, make sure that [GNU coreutils](https://www.gnu.org/software/coreutils/) is installed. Otherwise, install by: -* Debian +- Debian ```console $ sudo apt-get install coreutils ``` -* macOS +- macOS ```console $ brew install coreutils @@ -59,19 +59,23 @@ $ bash tools/init.sh What it does is: 1. Remove some files or directories from your repository: -* `.travis.yml` -* files under `_posts` -* folder `docs` + + - `.travis.yml` + - files under `_posts` + - folder `docs` + 2. If you use the `--no-gh` option, the directory `.github` will be deleted. Otherwise, setup the GitHub Action workflow by removing extension `.hook` of `.github/workflows/pages-deploy.yml.hook`, and then remove the other files and directories in folder `.github`. + 3. Automatically create a commit to save the changes. ### Configuration Generally, go to `_config.yml` and configure the variables as needed. Some of them are typical options: -* `url` -* `avatar` -* `timezone` -* `theme_mode` + +- `url` +- `avatar` +- `timezone` +- `theme_mode` ### Run Locally diff --git a/docs/README_zh-CN.md b/docs/README_zh-CN.md index 5588a70..e27df0b 100644 --- a/docs/README_zh-CN.md +++ b/docs/README_zh-CN.md @@ -15,31 +15,31 @@ ## 目录 -* [功能一览](#功能一览) -* [安装](#安装) -* [使用](#使用) -* [参与贡献](#参与贡献) -* [感谢](#感谢) -* [赞助](#赞助) -* [许可证书](#许可证书) +- [功能一览](#功能一览) +- [安装](#安装) +- [使用](#使用) +- [参与贡献](#参与贡献) +- [感谢](#感谢) +- [赞助](#赞助) +- [许可证书](#许可证书) ## 功能一览 -* 文章置顶 -* 可配置的全局主题颜色 -* 文章最后修改日期 -* 文章目录 -* 自动推荐相关文章 -* 语法高亮 -* 二级目录 -* 数学表达式 -* 搜索 -* Atom 订阅 -* Disqus 评论 -* Google 分析 -* GA 浏览报告(高级功能) -* SEO 优化 -* 网站性能优化 +- 文章置顶 +- 可配置的全局主题颜色 +- 文章最后修改日期 +- 文章目录 +- 自动推荐相关文章 +- 语法高亮 +- 二级目录 +- 数学表达式 +- 搜索 +- Atom 订阅 +- Disqus 评论 +- Google 分析 +- GA 浏览报告(高级功能) +- SEO 优化 +- 网站性能优化 ## 安装 @@ -63,13 +63,13 @@ $ bundle install 另外,为了生成一些额外的文件( Post 的分类、标签以及更新时间列表),需要用到一些脚本工具。如果你电脑的操作系统是 Debian 或者 macOS,请确保已经安装了[GNU coreutils](https://www.gnu.org/software/coreutils/),否则,通过以下方式完成安装: -* Debian +- Debian ```console $ sudo apt-get install coreutils ``` -* macOS +- macOS ```console $ brew install coreutils @@ -92,20 +92,23 @@ $ bash tools/init.sh 上述脚本完成了以下工作: 1. 从你的仓库中删除了: - * `.travis.yml` - * `_posts` 下的文件 - * `docs` 目录 + + - `.travis.yml` + - `_posts` 下的文件 + - `docs` 目录 + 2. 如果使用了参数 `--no-gh`,则会怒删 `.github`。否则,将会配置 GitHub Actions:把 `.github/workflows/pages-deploy.yml.hook` 的后缀 `.hook` 去除,然后删除 `.github` 里的其他目录和文件。 + 3. 自动提交一个 Commit 以保存上述文件的更改。 ### 配置文件 根据个人需要去修改 `_config.yml` 的变量,大部分都有注释介绍用法。典型的几个选项是: -* `url` -* `avatar` -* `timezone` -* `theme_mode` +- `url` +- `avatar` +- `timezone` +- `theme_mode` ### 本地运行