mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-12-18 05:41:31 +00:00
Improve markdown code style.
This commit is contained in:
@@ -11,16 +11,17 @@ This Jekyll template totally compatible with Markdown syntax. Now, let's take a
|
||||
|
||||
## Titles
|
||||
|
||||
***
|
||||
---
|
||||
|
||||
# H1
|
||||
|
||||
<h2 data-toc-skip>H2</h2>
|
||||
|
||||
<h3 data-toc-skip>H3</h3>
|
||||
|
||||
#### H4
|
||||
<h4>H4</h4>
|
||||
|
||||
***
|
||||
---
|
||||
|
||||
## Paragraph
|
||||
|
||||
@@ -42,11 +43,11 @@ Fluttering and dancing in the breeze.
|
||||
|
||||
## Tables
|
||||
|
||||
|Company|Contact|Country|
|
||||
|:---|:--|---:|
|
||||
|Alfreds Futterkiste | Maria Anders | Germany
|
||||
|Island Trading | Helen Bennett | UK
|
||||
|Magazzini Alimentari Riuniti | Giovanni Rovelli | Italy
|
||||
| Company | contact | Country |
|
||||
|:-----------------------------|:-----------------|--------:|
|
||||
| Alfreds Futterkiste | Maria Anders | Germany |
|
||||
| Island Trading | Helen Bennett | UK |
|
||||
| Magazzini Alimentari Riuniti | Giovanni Rovelli | Italy |
|
||||
|
||||
## Link
|
||||
|
||||
@@ -60,7 +61,7 @@ Click the hook will locate the footnote[^footnote].
|
||||
|
||||
## Image
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
## Inline code
|
||||
|
||||
@@ -33,7 +33,7 @@ In order to accurately record the release date of a post, you should not only se
|
||||
|
||||
The `categories` of each post is designed to contain up to two elements, and the number of elements in `tags` can be zero to infinity.
|
||||
|
||||
The list of posts belonging to the same _category_/_tag_ is recorded on a separate page. At the same time, the number of these _category_/_tag_ type pages is equal to the number of `categories` / `tags` elements for all posts, which means that the two number must be exactly the same.
|
||||
The list of posts belonging to the same *category*/*tag* is recorded on a separate page. At the same time, the number of these *category*/*tag* type pages is equal to the number of `categories` / `tags` elements for all posts, which means that the two number must be exactly the same.
|
||||
|
||||
For instance, let's say there is a post with front matter:
|
||||
|
||||
@@ -42,7 +42,7 @@ categories: [Animal, Insect]
|
||||
tags: bee
|
||||
```
|
||||
|
||||
Then we should have two _category_ type pages placed in folder `categories` of root and one _tag_ type page placed in folder `tags` of root:
|
||||
Then we should have two *category* type pages placed in folder `categories` of root and one *tag* type page placed in folder `tags` of root:
|
||||
|
||||
```sh
|
||||
.
|
||||
@@ -54,7 +54,7 @@ Then we should have two _category_ type pages placed in folder `categories` of r
|
||||
...
|
||||
```
|
||||
|
||||
and the content of a _category_ type page is
|
||||
and the content of a *category* type page is
|
||||
|
||||
```yaml
|
||||
---
|
||||
@@ -64,7 +64,7 @@ category: CATEGORY_NAME # e.g. Insect
|
||||
---
|
||||
```
|
||||
|
||||
the content of a _tag_ type page is
|
||||
the content of a *tag* type page is
|
||||
|
||||
```yaml
|
||||
---
|
||||
@@ -74,7 +74,7 @@ tag: TAG_NAME # e.g. bee
|
||||
---
|
||||
```
|
||||
|
||||
With the increasing number of posts, the number of categories and tags will increase several times! If we still manually create these *category*/_tag_ type files, it will obviously be a super time-consuming job, and it is very likely to miss some of them, i.e., when you click on the missing `category` or `tag` link from a post or somewhere, the browser will complain to you "404 Not Found". The good news is we got a lovely script tool `_scripts/sh/create_pages.sh` to finish the boring tasks. Basically we will use it via `run.sh`, `build.sh`, `deploy.sh` or `publish.sh` that placed in `tools/` instead of running it separately. Check out its use case [here]({{ "/posts/getting-started/#deployment" | relative_url }}).
|
||||
With the increasing number of posts, the number of categories and tags will increase several times! If we still manually create these *category*/*tag* type files, it will obviously be a super time-consuming job, and it is very likely to miss some of them, i.e., when you click on the missing `category` or `tag` link from a post or somewhere, the browser will complain to you "404 Not Found". The good news is we got a lovely script tool `_scripts/sh/create_pages.sh` to finish the boring tasks. Basically we will use it via `run.sh`, `build.sh`, `deploy.sh` or `publish.sh` that placed in `tools/` instead of running it separately. Check out its use case [here]({{ "/posts/getting-started/#deployment" | relative_url }}).
|
||||
|
||||
## Last modified date
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -11,11 +11,11 @@ In [**Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/), the image fi
|
||||
|
||||
With a square image (PNG, JPG or GIF) in hand, open the site [*Favicon & App Icon Generator*](https://www.favicon-generator.org/) and upload your original image.
|
||||
|
||||

|
||||

|
||||
|
||||
Click button <kbd>Create Favicon</kbd> and wait a moment for the website to generate the icons of various sizes automatically.
|
||||
|
||||

|
||||

|
||||
|
||||
Download the generated package, unzip and delete the following two from the extracted files:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user