Updated tutorial and README.
This commit is contained in:
parent
513ac76f1f
commit
5204f0c60e
2 changed files with 54 additions and 21 deletions
13
README.md
13
README.md
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
![devices-mockup](assets/img/sample/devices-mockup.png)
|
![devices-mockup](assets/img/sample/devices-mockup.png)
|
||||||
|
|
||||||
A Jekyll theme with responsive web design that focuses on text presentation. [Live Demo »](https://chirpy.cotes.info)
|
A Jekyll theme with responsive web design that focuses on text presentation. Hope you like it! [Live Demo »](https://chirpy.cotes.info)
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ A Jekyll theme with responsive web design that focuses on text presentation. [Li
|
||||||
|
|
||||||
## Quick start
|
## Quick start
|
||||||
|
|
||||||
First of all, complete the installation of the following environment dependencies:
|
Complete the installation of the following environment dependencies:
|
||||||
|
|
||||||
- [Ruby](https://www.ruby-lang.org/en/downloads/)
|
- [Ruby](https://www.ruby-lang.org/en/downloads/)
|
||||||
- [RubyGem](https://rubygems.org/pages/download)
|
- [RubyGem](https://rubygems.org/pages/download)
|
||||||
|
@ -31,10 +31,9 @@ First of all, complete the installation of the following environment dependencie
|
||||||
- [Jekyll](https://jekyllrb.com/)
|
- [Jekyll](https://jekyllrb.com/)
|
||||||
- [Python](https://www.python.org/downloads/)
|
- [Python](https://www.python.org/downloads/)
|
||||||
- [ruamel.yaml](https://pypi.org/project/ruamel.yaml/)
|
- [ruamel.yaml](https://pypi.org/project/ruamel.yaml/)
|
||||||
|
- [fswatch](http://emcrisostomo.github.io/fswatch/getting.html)
|
||||||
|
|
||||||
Clone the repository locally, but to prevent losing the latest features, consider using **Fork** instead of cloning.
|
Next, [**fork**](https://github.com/cotes2020/jekyll-theme-chirpy/fork) this project and rename as `<username>.github.io`, then clone the replicated repository locally. Go to the root directory and install the Jekyll plugins:
|
||||||
|
|
||||||
Install the Jekyll plugins:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
$ bundle install
|
$ bundle install
|
||||||
|
@ -48,7 +47,9 @@ $ bash run.sh
|
||||||
|
|
||||||
Now, open your favorite brower and visit <http://127.0.0.1:4000>
|
Now, open your favorite brower and visit <http://127.0.0.1:4000>
|
||||||
|
|
||||||
Please refer to the [documentation](https://chirpy.cotes.info/posts/getting-started/) for more details. Hope you like it.
|
## Documentation
|
||||||
|
|
||||||
|
For more details, please check the [tutorial](https://chirpy.cotes.info/posts/getting-started/). BTW, a copy of the tutorial is also available on the [Wiki](https://github.com/cotes2020/jekyll-theme-chirpy/wiki).
|
||||||
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
|
@ -2,20 +2,19 @@
|
||||||
title: Getting Started
|
title: Getting Started
|
||||||
date: 2019-08-09 20:55:00 +0800
|
date: 2019-08-09 20:55:00 +0800
|
||||||
categories: [Blogging, Tutorial]
|
categories: [Blogging, Tutorial]
|
||||||
tags: [usage]
|
tags: [getting started]
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Preparation
|
||||||
|
|
||||||
## Basic Environment
|
First of all, follow the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installtion of basic environment (Ruby, RubyGem, Bundler and Jekyll). In addition, to use the funny script tools, we also need to install [Python](https://www.python.org/downloads/)(version 3.5 or abover), [ruamel.yaml](https://pypi.org/project/ruamel.yaml/) and [fswatch](http://emcrisostomo.github.io/fswatch/getting.html).
|
||||||
|
|
||||||
First of all, follow the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the basic environment (Ruby, RubyGem, Bundler and Jekyll) installation.
|
Next, [fork Chirpy](https://github.com/cotes2020/jekyll-theme-chirpy/fork) and then clone the replicated repository locally.
|
||||||
|
|
||||||
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
|
## Install Jekyll plugins
|
||||||
|
|
||||||
In the root direcoty of the project, run the following command:
|
Go to root directory of the repository and run the following:
|
||||||
|
|
||||||
```terminal
|
```terminal
|
||||||
$ bundle install
|
$ bundle install
|
||||||
|
@ -24,6 +23,39 @@ $ bundle install
|
||||||
`bundle` will install all the dependent Jekyll Plugins listed in file `Gemfile` automatically.
|
`bundle` will install all the dependent Jekyll Plugins listed in file `Gemfile` automatically.
|
||||||
|
|
||||||
|
|
||||||
|
## File structure
|
||||||
|
|
||||||
|
The main files and related brief introductions are listed below.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
jekyll-theme-chirpy/
|
||||||
|
├── _data
|
||||||
|
├── _includes
|
||||||
|
├── _layouts
|
||||||
|
├── _posts # posts stay here
|
||||||
|
├── _scripts
|
||||||
|
├── assets
|
||||||
|
├── tabs
|
||||||
|
│ └── about.md # the ABOUT page
|
||||||
|
├── .gitignore
|
||||||
|
├── .travis.yml # remove it
|
||||||
|
├── 404.html
|
||||||
|
├── Gemfile
|
||||||
|
├── LICENSE
|
||||||
|
├── README.md
|
||||||
|
├── _config.yml # configuration file
|
||||||
|
├── build.sh # script tool
|
||||||
|
├── run.sh # script tool
|
||||||
|
├── init.sh # script tool
|
||||||
|
├── pv.sh
|
||||||
|
├── feed.xml
|
||||||
|
├── index.html
|
||||||
|
├── robots.txt
|
||||||
|
├── search.json
|
||||||
|
└── sitemap.xml
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
Customize the variables in file `_config.yml` as needed.
|
Customize the variables in file `_config.yml` as needed.
|
||||||
|
@ -34,26 +66,26 @@ Customize the variables in file `_config.yml` as needed.
|
||||||
The Atom feed url of your site will be:
|
The Atom feed url of your site will be:
|
||||||
|
|
||||||
```
|
```
|
||||||
<site_url>/feed.xml
|
<SITE_URL>/feed.xml
|
||||||
```
|
```
|
||||||
|
|
||||||
The `site_url` was defined by variable `url` in file `_config.yml`.
|
The `SITE_URL` was defined by variable `url` in file `_config.yml`.
|
||||||
|
|
||||||
|
|
||||||
## Run Locally
|
## Run locally
|
||||||
|
|
||||||
You may want to preview the site before publishing, so just run the script in the root directory:
|
You may want to preview the site before publishing, so just run the script tool:
|
||||||
|
|
||||||
```terminal
|
```terminal
|
||||||
$ bash run.sh
|
$ bash run.sh
|
||||||
```
|
```
|
||||||
>**Note**: Because the *Recent Update* required the latest git-log date of posts, make sure the changes of `_posts` have been committed before running this command.
|
>**Note**: Because the *Recent Update* required the latest git-log date of posts, so make sure the changes of `_posts` have been committed before running this command.
|
||||||
|
|
||||||
Open the brower and visit [http://127.0.0.1:4000](http://127.0.0.1:4000)
|
Open a brower and visit <http://127.0.0.1:4000>
|
||||||
|
|
||||||
## Deploying to GitHub Pages
|
## Deploying to GitHub Pages
|
||||||
|
|
||||||
Before the deployment begins, ensure the `url` in `_config.yml` has been set to `https://<username>.github.io`.
|
Before the deployment begins, rename your project as `<username>.github.io` and ensure the `url` in `_config.yml` has been set to `https://<username>.github.io`.
|
||||||
|
|
||||||
### Option 1: Built by GitHub Pages
|
### Option 1: Built by GitHub Pages
|
||||||
|
|
||||||
|
@ -76,7 +108,7 @@ It will automatically generates the *Latest Modified Date* and *Categories / Tag
|
||||||
**4**. Visit `https://<username>.github.io` and enjoy.
|
**4**. Visit `https://<username>.github.io` and enjoy.
|
||||||
|
|
||||||
|
|
||||||
### Option 2: Build Locally
|
### 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**.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue