From c363d5158db7a82f0da7096c834a61a670dbf2b5 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Sat, 12 Oct 2019 00:46:12 +0800 Subject: [PATCH] Update Docs. --- _posts/2019-08-09-getting-started.md | 78 +++++++++++----------- _posts/2019-08-11-customize-the-favicon.md | 17 ++--- tabs/about.md | 2 +- 3 files changed, 46 insertions(+), 51 deletions(-) diff --git a/_posts/2019-08-09-getting-started.md b/_posts/2019-08-09-getting-started.md index b9cd532..e8e5f4c 100644 --- a/_posts/2019-08-09-getting-started.md +++ b/_posts/2019-08-09-getting-started.md @@ -10,12 +10,25 @@ tags: [usage] First of all, follow the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the basic environment (Ruby, RubyGem, Bundler and Jekyll) installation. -In addition, the [Python](https://www.python.org/downloads/) and [ruamel.yaml](https://pypi.org/project/ruamel.yaml/) are also required. +In addition, the [Python](https://www.python.org/downloads/)(version 3.5 or abover) and [ruamel.yaml](https://pypi.org/project/ruamel.yaml/) are also required. + + +## Install Jekyll Plugins + +In the root direcoty of the project, run the following command: + +```terminal +$ bundle install +``` + +`bundle` will install all the dependent Jekyll Plugins listed in file `Gemfile` automatically. + ## Configuration Customize the variables in file `_config.yml` as needed. + ## Atom Feed The Atom feed url of your site will be: @@ -26,19 +39,10 @@ The Atom feed url of your site will be: The `site_url` was defined by variable `url` in file `_config.yml`. -## Install Jekyll Plugins - -In the root direcoty of the project, run the following command: - -```terminal -$ bundle install -``` - -`bundle` will install all dependent Jekyll Plugins declared in `Gemfile` that stored in the root automatically. ## Run Locally -You may want to preview the site before publishing. Run the script in the root directory: +You may want to preview the site before publishing, so just run the script in the root directory: ```terminal $ bash run.sh @@ -49,7 +53,30 @@ Open the brower and visit [http://127.0.0.1:4000](http://127.0.0.1:4000) ## Deploying to GitHub Pages -### Option 1: Local Build +Before the deployment begins, ensure the `url` in `_config.yml` has been set to `https://.github.io`. + +### Option 1: Built by GitHub Pages + +By deploying your site in this way, you can push the source code to GitHub repository directly. + +> **Note**: If you want to add any third-party Jekyll plugins or custom scripts to your project, please refer to [*Option 2: Build locally*](#option-2-build-locally). + +**1**. Rename your repository as `.github.io`. + +**2**. Commit the changes of your repository, then run the initialization script: + +```console +$ bash init.sh +``` + +It will automatically generates the *Latest Modified Date* and *Categories / Tags* page for the posts. + +**3**. Push the changes to `origin/master` then go to GitHub website and enable GitHub Pages service for the repository `.github.io`. + +**4**. Visit `https://.github.io` and enjoy. + + +### Option 2: Build Locally For security reasons, GitHub Pages runs on `safe` mode, which means the third-party Jekyll plugins or custom scripts will not work. If you want to use any another third-party Jekyll plugins, **your have to build locally rather than on GitHub Pages**. @@ -66,30 +93,3 @@ The build results will be stored in the root directory of `.github.io` **3**. Go to GitHub website and enable GitHub Pages service for the new repository `.github.io`. **4**. Visit `https://.github.io` and enjoy. - - -### Option 2: Built by GitHub Pages - -By deploying your site in this way, you can push the source code to GitHub repository directly. - -> **Note**: If you want to add any third-party Jekyll plugins or custom scripts to your project, please refer to [*Option 1: Build locally*](#option-1-build-locally). - -**1**. Rename your repository as `.github.io`. - -**2**. Commit the changes of your repository before running the initialization script: - -```console -$ bash init.sh -``` - -It will automatically generates the *Latest Modified Date* and *Categories / Tags* page for the posts. - -**3**. Push the changes to `origin/master` then go to GitHub website and enable GitHub Pages service for the repository `.github.io`. - -**4**. Visit `https://.github.io` and enjoy. - -## See Also - -* [Write a new post]({{ site.baseurl }}/posts/write-a-new-post/) -* [Text and Typography]({{ site.baseurl }}/posts/text-and-typography/) -* [Customize the Favicon]({{ site.baseurl }}/posts/customize-the-favicon/) diff --git a/_posts/2019-08-11-customize-the-favicon.md b/_posts/2019-08-11-customize-the-favicon.md index 7fd4532..20e0143 100644 --- a/_posts/2019-08-11-customize-the-favicon.md +++ b/_posts/2019-08-11-customize-the-favicon.md @@ -12,22 +12,17 @@ Whit a square image (PNG, JPG or GIF) in hand, open the site [*Favicon & App Ico ![upload-image]({{ site.baseurl }}/assets/img/sample/upload-image.png) -Wait a moment for the website to generate icons of various sizes automatically. +Click button Create Favicon and wait a moment for the website to generate the icons of various sizes automatically. ![download-icons]({{ site.baseurl }}/assets/img/sample/download-icons.png) -Download the generated package and extract the contents to cover all files in folder `assets/img/favicons`, but except the following two: +Download the generated package and extract, then remove the following two of them: - browserconfig.xml - manifest.json + +Now, copy the rest (`.PNG` and `.ICO`) to cover the original files in folder `assets/img/favicons`. + +In the end, rebuild your site so that the icon becomes your custom edition. - -At last, rebuild the site so that the icon becomes your custom edition. - -## See Also - -* [Getting Started]({{ site.baseurl }}/posts/getting-started/) -* [Write a new post]({{ site.baseurl }}/posts/write-a-new-post/) -* [Text and Typography]({{ site.baseurl }}/posts/text-and-typography/) - diff --git a/tabs/about.md b/tabs/about.md index bcb7dba..13d923e 100644 --- a/tabs/about.md +++ b/tabs/about.md @@ -28,7 +28,7 @@ You can fork this project from the [Homepage](https://github.com/cotes2020/jekyl ## Usage -Follow the [tutorial posts]({{ site.baseurl }}/categories/tutorial/), it will help you build a site quickly. +Follow the [tutorial posts]({{ site.baseurl }}/categories/tutorial/), they will help you build a site quickly. ## License