1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-30 19:42:40 +00:00

Improve markdown code style.

This commit is contained in:
Cotes Chung
2020-08-20 01:11:56 +08:00
parent 9e14673349
commit 60a8a2fa41
9 changed files with 60 additions and 87 deletions

View File

@@ -42,7 +42,6 @@ What's more, in order to generate some extra files (*categories*, *tags* and *la
$ 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.
@@ -60,12 +59,10 @@ $ 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
@@ -76,7 +73,6 @@ Generally, go to `_config.yml` and configure the variables as needed. Some of th
* `timezone`
* `theme_mode`
### Run Locally
You may want to preview the site contents before publishing, so just run it by:
@@ -91,7 +87,7 @@ Few days later, you may find that the file changes does not refresh in real time
### Deployment
Before the deployment begins, checkout 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 starting with a slash. For example, `/project`.
Before the deployment begins, checkout 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 starting with a slash. For example, `/project`.
Assuming you have already gone through the [initialization](#initialization), you can now choose any of the following methods to deploy your website.
@@ -100,11 +96,8 @@ Assuming you have already gone through the [initialization](#initialization), yo
For security reasons, GitHub Pages build runs on `safe` mode, which restricts us from using tool scripts 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 Pages service.
1. Push any commit to `origin/master` to trigger the GitHub Actions workflow. Once the build is complete, a new remote branch called `gh-pages` will appear, which is used to store the built site files.
2. Unless you prefer to project sites, rename your repository to `<username>.github.io` on GitHub.
3. Choose branch `gh-pages` as the [publishing source](https://docs.github.com/en/github/working-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site) for your GitHub Pages site.
4. Visit your website at the address indicated by GitHub.
#### Deploy on Other Platforms