Update Docs.
This commit is contained in:
parent
baef16224c
commit
c363d5158d
3 changed files with 46 additions and 51 deletions
|
@ -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.
|
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
|
## Configuration
|
||||||
|
|
||||||
Customize the variables in file `_config.yml` as needed.
|
Customize the variables in file `_config.yml` as needed.
|
||||||
|
|
||||||
|
|
||||||
## Atom Feed
|
## Atom Feed
|
||||||
|
|
||||||
The Atom feed url of your site will be:
|
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`.
|
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
|
## 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
|
```terminal
|
||||||
$ bash run.sh
|
$ 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
|
## Deploying to GitHub Pages
|
||||||
|
|
||||||
### Option 1: Local Build
|
Before the deployment begins, ensure the `url` in `_config.yml` has been set to `https://<username>.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 `<username>.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 `<username>.github.io`.
|
||||||
|
|
||||||
|
**4**. Visit `https://<username>.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**.
|
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 `<username>.github.io`
|
||||||
**3**. Go to GitHub website and enable GitHub Pages service for the new repository `<username>.github.io`.
|
**3**. Go to GitHub website and enable GitHub Pages service for the new repository `<username>.github.io`.
|
||||||
|
|
||||||
**4**. Visit `https://<username>.github.io` and enjoy.
|
**4**. Visit `https://<username>.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 `<username>.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 `<username>.github.io`.
|
|
||||||
|
|
||||||
**4**. Visit `https://<username>.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/)
|
|
||||||
|
|
|
@ -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)
|
![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 <kbd>Create Favicon</kbd> 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-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
|
- browserconfig.xml
|
||||||
- manifest.json
|
- 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/)
|
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ You can fork this project from the [Homepage](https://github.com/cotes2020/jekyl
|
||||||
|
|
||||||
## Usage
|
## 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
|
## License
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue