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:
@@ -40,7 +40,6 @@
|
||||
* SEO 优化
|
||||
* 网站性能优化
|
||||
|
||||
|
||||
## 安装
|
||||
|
||||
[Fork **Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/fork),然后克隆到本地:
|
||||
@@ -53,7 +52,6 @@ $ git clone git@github.com:<username>/jekyll-theme-chirpy -b master --single-bra
|
||||
|
||||
如果你想在本地运行或构建, 参考 [Jekyll Docs](https://jekyllrb.com/docs/installation/)安装 `Ruby`, `RubyGems` 和 `Bundler`。
|
||||
|
||||
|
||||
首次运行或构建时, 请先安装 Jekyll plugins。在项目根目录运行:
|
||||
|
||||
```terminal
|
||||
@@ -76,7 +74,6 @@ $ bundle install
|
||||
$ brew install coreutils
|
||||
```
|
||||
|
||||
|
||||
## 使用
|
||||
|
||||
运行 [**Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/) 需要一些额外的文件, 它们不能通过 Jekyll 原生的命令生成,所以请严格依照下列说明去运行或部署此项目。
|
||||
@@ -94,12 +91,10 @@ $ bash tools/init.sh
|
||||
上述脚本完成了以下工作:
|
||||
|
||||
1. 从你的仓库中删除了:
|
||||
- `.travis.yml`
|
||||
- `_posts` 下的文件
|
||||
- `docs` 目录
|
||||
|
||||
* `.travis.yml`
|
||||
* `_posts` 下的文件
|
||||
* `docs` 目录
|
||||
2. 如果使用了参数 `--no-gh`,则会怒删 `.github`。否则,将会配置 GitHub Actions:把 `.github/workflows/pages-deploy.yml.hook` 的后缀 `.hook` 去除,然后删除 `.github` 里的其他目录和文件。
|
||||
|
||||
3. 自动提交一个 Commit 以保存上述文件的更改。
|
||||
|
||||
### 配置文件
|
||||
@@ -123,7 +118,6 @@ $ bash tools/run.sh
|
||||
|
||||
如果你想在本地服务运行后,把修改源文件的更改实时刷新,可使用选项 `-r` (或 `--realtime`),不过要先安装依赖 [**fswatch**](http://emcrisostomo.github.io/fswatch/) 。
|
||||
|
||||
|
||||
### 部署
|
||||
|
||||
部署开始前,把 `_config.yml` 的 `url` 改为 `https://<username>.github.io`(或者你的私有域名,如:`https://yourdomain.com`)。另外,如果你想使用 [Project 类型网站](https://help.github.com/en/github/working-with-github-pages/about-github-pages#types-of-github-pages-sites),修改配置文件的 `baseurl` 为项目名称,以斜杠开头,如:`/project`。
|
||||
@@ -135,11 +129,8 @@ $ bash tools/run.sh
|
||||
由于安全原因,GitHub Pages 的构建强制加了 `safe`参数,这导致了我们不能使用脚本工具去创建所需的附加页面。因此,我们可以使用 GitHub Actions 去构建站点,把站点文件存储在一个新分支上,再指定该分支作为 Pages 服务的源。
|
||||
|
||||
1. 推送任意一个 commit 到 `origin/master` 以触发 GitHub Actions workflow。一旦 build 完毕,远端将会自动出现一个新分支 `gh-pages` 用来存储构建的站点文件。
|
||||
|
||||
2. 除非你是使用 project 站点, 否则重命名你的仓库为 `<username>.github.io`。
|
||||
|
||||
3. 选择分支 `gh-pages` 作为 GitHub Pages 站点的[发布源](https://docs.github.com/en/github/working-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site).
|
||||
|
||||
4. 按照 GitHub 指示的地址去访问你的网站。
|
||||
|
||||
#### 部署到其他 Pages 平台
|
||||
@@ -179,7 +170,6 @@ $ bash tools/build.sh -d /path/to/site/
|
||||
|
||||
若想要更多细节以及更佳的阅读体验,请参阅 [线上教程](https://chirpy.cotes.info/categories/tutorial/)。 与此同时,[Wiki](https://github.com/cotes2020/jekyll-theme-chirpy/wiki) 也有一份教程的拷贝。
|
||||
|
||||
|
||||
## 参与贡献
|
||||
|
||||
三人行必有我师,欢迎提报告 bug, 帮助改进代码质量,或者提交新功能。具体操作规则请参考 [贡献指南](../.github/CONTRIBUTING.md),谢谢 🙏。
|
||||
@@ -190,12 +180,10 @@ $ bash tools/build.sh -d /path/to/site/
|
||||
|
||||
:tada: 感谢所有参与代码贡献的小伙伴, 他们的 GayHub ID 在这个[列表](https://github.com/cotes2020/jekyll-theme-chirpy/graphs/contributors)。 另外, 提交过 issues(或者未被合并 PR) 的高富帅和白富美也不会被遗忘,他/她们帮助报告 bug、分享新点子或者启发了我写出更通俗易懂的文档。
|
||||
|
||||
|
||||
## 赞助
|
||||
|
||||
如果您喜欢这个主题或者它对您有帮助,请考虑打赏作者:在 [项目主页](https://github.com/cotes2020/jekyll-theme-chirpy) 点击按钮 <kbd>:heart: Sponsor</kbd> 选择适合的链接即可完成(国内一般选第二个链接,支付宝/微信赞助),您的打赏将会极大地鼓励作者,并帮助作者更好地维护项目!
|
||||
|
||||
|
||||
## 许可证书
|
||||
|
||||
本项目开源,基于 [MIT](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE) 许可。
|
||||
|
||||
Reference in New Issue
Block a user