From 640bde95c48cd3517c88f45355a502054469dff3 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Sun, 9 Jan 2022 03:01:00 +0800 Subject: [PATCH 1/4] Fix tutorial on writing posts --- _posts/2019-08-08-write-a-new-post.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/_posts/2019-08-08-write-a-new-post.md b/_posts/2019-08-08-write-a-new-post.md index c103415..df46625 100644 --- a/_posts/2019-08-08-write-a-new-post.md +++ b/_posts/2019-08-08-write-a-new-post.md @@ -217,7 +217,6 @@ The output will be: ``` {: .nolineno } - ### Preview Image If you want to add an image to the top of the post contents, specify the attribute `src`, `width`, `height`, and `alt` for the image: @@ -250,9 +249,11 @@ pin: true Markdown symbols ```` ``` ```` can easily create a code block as follows: +````md ``` This is a plaintext code snippet. ``` +```` ### Specifying Language @@ -268,18 +269,18 @@ key: value ### Line Number -By default, all languages except `plaintext`, `console`, and `terminal` will display line numbers. When you want to hide the line number of the code block, you can append `{: .nolineno}` at the next line: +By default, all languages except `plaintext`, `console`, and `terminal` will display line numbers. When you want to hide the line number of a code block, add the class `nolineno` to it: ````markdown ```shell echo 'No more line numbers!' ``` -{: .nolineno} +{: .nolineno } ```` ### Specifying the Filename -You may have noticed that the code language will be displayed on the left side of the header of the code block. If you want to replace it with the file name, you can add the attribute `file` to achieve this: +You may have noticed that the code language will be displayed at the top of the code block. If you want to replace it with the file name, you can add the attribute `file` to achieve this: ````markdown ```shell From 1b379e387090883d04148eb97bc04bbc684bf2b9 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Tue, 11 Jan 2022 18:33:05 +0800 Subject: [PATCH 2/4] Improve chapter levels of guide --- _posts/2019-08-09-getting-started.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/_posts/2019-08-09-getting-started.md b/_posts/2019-08-09-getting-started.md index 8c45c18..475f67e 100644 --- a/_posts/2019-08-09-getting-started.md +++ b/_posts/2019-08-09-getting-started.md @@ -95,13 +95,13 @@ $ docker run -it --rm \ After a while, the local service will be published at __. -### Deployment +## Deployment Before the deployment begins, check out the file `_config.yml` and make sure the `url` is configured correctly. Furthermore, if you prefer the [**project site**](https://help.github.com/en/github/working-with-github-pages/about-github-pages#types-of-github-pages-sites) and don't use a custom domain, or you want to visit your website with a base URL on a web server other than **GitHub Pages**, remember to change the `baseurl` to your project name that starts with a slash, e.g, `/project-name`. Now you can choose ONE of the following methods to deploy your Jekyll site. -#### Deploy by Using Github Actions +### Deploy by Using Github Actions For security reasons, GitHub Pages build runs on `safe` mode, which restricts us from using plugins to generate additional page files. Therefore, we can use **GitHub Actions** to build the site, store the built site files on a new branch, and use that branch as the source of the GitHub Pages service. @@ -129,7 +129,7 @@ Now publish your Jekyll site by: 3. Visit your website at the address indicated by GitHub. -#### Manually Build and Deploy +### Manually Build and Deploy On self-hosted servers, you cannot enjoy the convenience of **GitHub Actions**. Therefore, you should build the site on your local machine and then upload the site files to the server. @@ -151,7 +151,7 @@ $ docker run -it --rm \ Unless you specified the output path, the generated site files will be placed in folder `_site` of the project's root directory. Now you should upload those files to the target server. -### Upgrading +## Upgrading It depends on how you use the theme: From 7788a140f20521f25d63697666466c34938a9847 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Sat, 15 Jan 2022 20:16:20 +0800 Subject: [PATCH 3/4] Update prerequisites in tutorial (resolve #484) --- README.md | 2 +- _posts/2019-08-09-getting-started.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7695994..1eb7b8a 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ ## Quick Start -Before starting, please follow the instructions in the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of `Ruby`, `RubyGems`, `Jekyll`, and `Bundler`. +Before starting, please follow the instructions in the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of `Ruby`, `RubyGems`, `Jekyll`, and `Bundler`. In addition, [Git](https://git-scm.com/) is also required to be installed. ### Step 1. Creating a New Site diff --git a/_posts/2019-08-09-getting-started.md b/_posts/2019-08-09-getting-started.md index 475f67e..b45fe62 100644 --- a/_posts/2019-08-09-getting-started.md +++ b/_posts/2019-08-09-getting-started.md @@ -11,7 +11,7 @@ pin: true ## Prerequisites -Follow the instructions in the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of `Ruby`, `RubyGems`, `Jekyll`, and `Bundler`. +Follow the instructions in the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of `Ruby`, `RubyGems`, `Jekyll`, and `Bundler`. In addition, [Git](https://git-scm.com/) is also required to be installed. ## Installation From 323a888160b160ef80f91fcdbf7f8c223aad0724 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Tue, 18 Jan 2022 20:55:58 +0800 Subject: [PATCH 4/4] Update docs in real time --- .travis.yml | 44 ++++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/.travis.yml b/.travis.yml index 34eddf4..e80ba64 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,32 +1,40 @@ os: linux dist: bionic +language: ruby +rvm: 2.7.0 -language: minimal +before_script: git -C "$HOME" clone "$BUILDER_REPO" --depth=1 -q -# only run on tags -if: branch =~ /^v(\d)+(\.(\d)+){2}$/ OR tag IS present +addons: + apt: + packages: + - libcurl4-openssl-dev # to avoid SSL error (for htmlproofer) + +# Overriding to drop the `--development` flag which requires the Gemfile.lock at build +install: bundle install --jobs=3 --retry=3 --path=vendor/bundle jobs: include: - - name: Deploy - language: ruby - rvm: 2.7.0 - addons: - apt: - packages: - - libcurl4-openssl-dev # to avoid SSL error (for htmlproofer) - install: - - bundle install --jobs=3 --retry=3 # overriding to drop the travis `--development` flag - script: - - eval "$BUILD_CMD" + - stage: Deploy git: depth: false # for posts' lastmod - - - name: Flush Starter + script: eval "$BUILD_CMD" + - stage: Flush Starter + install: true # skip install step script: eval "$FLUSH_STARTER" + - stage: Update Docs + cache: bundler + git: + depth: false # for posts' lastmod + script: eval "$DOCS_CMD" -before_script: - - git -C "$HOME" clone "$BUILDER_REPO" --depth=1 -q +stages: + - name: Deploy + if: branch =~ /^v(\d)+(\.(\d)+){2}$/ OR tag IS present + - name: Flush Starter + if: branch =~ /^v(\d)+(\.(\d)+){2}$/ OR tag IS present + - name: Update Docs + if: branch = docs notifications: email: