docs: move the development guide to README (#900)
This commit is contained in:
parent
fe82cea576
commit
09121c1d11
2 changed files with 83 additions and 103 deletions
65
.github/CONTRIBUTING.md
vendored
65
.github/CONTRIBUTING.md
vendored
|
@ -1,66 +1,55 @@
|
|||
# How to Contribute
|
||||
|
||||
We'd like to thank you for sparing time to improve this project! Here are some guidelines for contributing:
|
||||
:tada: We really appreciate you taking the time to improve this project! :tada:
|
||||
|
||||
To ensure that the blog design is not confused, this project does not accept suggestions for design changes, such as color scheme, fonts, typography, etc. If your request is about an enhancement, it is recommended to first submit a [_Feature Request_](https://github.com/cotes2020/jekyll-theme-chirpy/issues/new?labels=enhancement&template=feature_request.md) issue to discuss whether your idea fits the project.
|
||||
To ensure that the blog design is not confusing, this project does not accept
|
||||
suggestions for design changes, such as color scheme, fonts, typography, etc.
|
||||
If your request is about an enhancement, it is recommended to first submit a
|
||||
[Feature Request][pr-issue] issue to discuss whether your idea fits the project.
|
||||
|
||||
## Basic Process
|
||||
|
||||
Generally, contribute to the project by:
|
||||
Basically, you can follow these steps to complete the contribution.
|
||||
|
||||
1. Fork this project on GitHub and clone it locally.
|
||||
2. Create a new branch from the default branch and give it a descriptive name (format: `feature/<add-new-feat>` / `fix/<fix-a-bug>`).
|
||||
3. After completing the development, submit a new _Pull Request_. Note that the commit message must follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/), otherwise it will fail the PR check.
|
||||
2. Create a new branch from the default branch and give it a descriptive name
|
||||
(format: `feature/<add-new-feat>` or `fix/<fix-a-bug>`).
|
||||
3. After completing development, create a [Conventional Commit][cc] with git.
|
||||
(See also: ["Verify the commits"](#verify-the-commits))
|
||||
4. Create a [Pull Request][gh-pr].
|
||||
|
||||
## Modifying JavaScript
|
||||
## Make sure you can pass the CI tests
|
||||
|
||||
If your contribution involves JavaScript modification, please read the following sections.
|
||||
|
||||
### Inline Scripts
|
||||
|
||||
If you need to add comments to the inline JavaScript (the code between the HTML tags `<script>` and `</script>`), please use `/* */` instead of two slashes `//`. Because the HTML will be compressed by [jekyll-compress-html](https://github.com/penibelst/jekyll-compress-html) during deployment, but it cannot handle the `//` properly, which will disrupt the structure of the compressed HTML.
|
||||
|
||||
### External Scripts
|
||||
|
||||
If you need to add/change/delete the JavaScript in the directory `_javascript/`, setting up [`Node.js`](https://nodejs.org/) and [`npx`](https://www.npmjs.com/package/npx) is a requirement. And then install the development dependencies:
|
||||
This project has [CI][ci] turned on. In order for your [PR][gh-pr] to pass the test,
|
||||
please read the following.
|
||||
|
||||
### Check the core functionality
|
||||
|
||||
```console
|
||||
$ npm i
|
||||
bash ./tools/test
|
||||
```
|
||||
|
||||
During JavaScript development, real-time debugging can be performed through the following commands:
|
||||
|
||||
Firstly, start a Jekyll server:
|
||||
### Check the SASS syntax style
|
||||
|
||||
```console
|
||||
$ bash tools/run
|
||||
npm test
|
||||
```
|
||||
|
||||
And then open a new terminal tab and run:
|
||||
### Verify the commits
|
||||
|
||||
```console
|
||||
# Type 'Ctrl + C' to stop
|
||||
$ npx gulp dev
|
||||
```
|
||||
|
||||
After debugging, run the command `npx gulp` (without any argument) will automatically output the compressed files to the directory `assets/js/dist/`.
|
||||
|
||||
## Verify the commit messages
|
||||
|
||||
If you want to make sure your commits pass the CI check, you can refer to the following steps.
|
||||
Before you create a git commit, please complete the following setup.
|
||||
|
||||
Install `commitlint` & `husky`:
|
||||
|
||||
```console
|
||||
$ npm i -g @commitlint/{cli,config-conventional} husky
|
||||
npm i -g @commitlint/{cli,config-conventional} husky
|
||||
```
|
||||
|
||||
And then enable `husky`:
|
||||
|
||||
```console
|
||||
$ husky install
|
||||
husky install
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
:tada: Your volunteering will make the open-source world more beautiful, thanks again! :tada:
|
||||
[pr-issue]: https://github.com/cotes2020/jekyll-theme-chirpy/issues/new?labels=enhancement&template=feature_request.md
|
||||
[gh-pr]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests
|
||||
[cc]: https://www.conventionalcommits.org/
|
||||
[ci]: https://en.wikipedia.org/wiki/Continuous_integration
|
||||
|
|
121
README.md
121
README.md
|
@ -2,7 +2,7 @@
|
|||
|
||||
# Chirpy Jekyll Theme
|
||||
|
||||
A minimal, responsive, and powerful Jekyll theme for presenting professional writing.
|
||||
A minimal, responsive and feature-rich Jekyll theme for technical writing.
|
||||
|
||||
[![Gem Version](https://img.shields.io/gem/v/jekyll-theme-chirpy?color=brightgreen)](https://rubygems.org/gems/jekyll-theme-chirpy)
|
||||
[![CI](https://github.com/cotes2020/jekyll-theme-chirpy/actions/workflows/ci.yml/badge.svg)](https://github.com/cotes2020/jekyll-theme-chirpy/actions/workflows/ci.yml)
|
||||
|
@ -10,97 +10,88 @@
|
|||
[![GitHub license](https://img.shields.io/github/license/cotes2020/jekyll-theme-chirpy.svg)](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE)
|
||||
[![996.icu](https://img.shields.io/badge/link-996.icu-%23FF4D5B.svg)](https://996.icu)
|
||||
|
||||
[**Live Demo →**](https://cotes2020.github.io/chirpy-demo)
|
||||
[**Live Demo →**][demo]
|
||||
|
||||
[![Devices Mockup](https://chirpy-img.netlify.app/commons/devices-mockup.png)](https://cotes2020.github.io/chirpy-demo)
|
||||
[![Devices Mockup](https://chirpy-img.netlify.app/commons/devices-mockup.png)][demo]
|
||||
|
||||
</div>
|
||||
|
||||
## Features
|
||||
|
||||
- Dark/Light Theme Mode
|
||||
- Localized UI language
|
||||
- Pinned Posts
|
||||
- Hierarchical Categories
|
||||
- Trending Tags
|
||||
- Table of Contents
|
||||
- Last Modified Date of Posts
|
||||
- Syntax Highlighting
|
||||
- Mathematical Expressions
|
||||
- Mermaid Diagram & Flowchart
|
||||
- Dark/Light Mode Images
|
||||
- Embed Videos
|
||||
- Disqus/Utterances/Giscus Comments
|
||||
- Search
|
||||
- Atom Feeds
|
||||
- Google Analytics
|
||||
- Page Views Reporting
|
||||
- SEO & Performance Optimization
|
||||
<details>
|
||||
<summary>
|
||||
<i>Click to check out the features</i>
|
||||
</summary>
|
||||
<p>
|
||||
|
||||
## Quick Start
|
||||
- Dark/Light Theme Mode
|
||||
- Localized UI language
|
||||
- Pinned Posts
|
||||
- Hierarchical Categories
|
||||
- Trending Tags
|
||||
- Table of Contents
|
||||
- Last Modified Date of Posts
|
||||
- Syntax Highlighting
|
||||
- Mathematical Expressions
|
||||
- Mermaid Diagram & Flowchart
|
||||
- Dark/Light Mode Images
|
||||
- Embed Videos
|
||||
- Disqus/Utterances/Giscus Comments
|
||||
- Search
|
||||
- Atom Feeds
|
||||
- Google Analytics
|
||||
- Page Views Reporting
|
||||
- SEO & Performance Optimization
|
||||
|
||||
Follow the instructions in the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete the installation of the basic environment. [Git](https://git-scm.com/) also needs to be installed.
|
||||
|
||||
### Step 1. Creating a New Site
|
||||
|
||||
Sign in to GitHub and browse to [**Chirpy Starter**](https://github.com/cotes2020/chirpy-starter/), click the button <kbd>Use this template</kbd> > <kbd>Create a new repository</kbd>, and name the new repository `USERNAME.github.io`, where `USERNAME` represents your GitHub username.
|
||||
|
||||
### Step 2. Installing Dependencies
|
||||
|
||||
Clone it to your local machine, go to its root directory, and run the following command to install the dependencies.
|
||||
|
||||
```console
|
||||
$ bundle
|
||||
```
|
||||
|
||||
### Step 3. Running Local Server
|
||||
|
||||
Run the following command in the root directory of your site:
|
||||
|
||||
```console
|
||||
$ bundle exec jekyll s
|
||||
```
|
||||
|
||||
Or run with Docker:
|
||||
|
||||
```console
|
||||
$ docker run -it --rm \
|
||||
--volume="$PWD:/srv/jekyll" \
|
||||
-p 4000:4000 jekyll/jekyll \
|
||||
jekyll serve
|
||||
```
|
||||
|
||||
After a few seconds, the local service will be published at _<http://127.0.0.1:4000>_.
|
||||
</p>
|
||||
</details>
|
||||
|
||||
## Documentation
|
||||
|
||||
For more details on usage, please refer to the tutorial on the [demo website](https://cotes2020.github.io/chirpy-demo/) or [wiki](https://github.com/cotes2020/jekyll-theme-chirpy/wiki). Note that the tutorial is based on the [latest release](https://github.com/cotes2020/jekyll-theme-chirpy/releases/latest), and the features of the default branch are usually ahead of the documentation.
|
||||
To explore usage, development, and upgrade guide of the project, please refer to
|
||||
the [Wiki][wiki].
|
||||
|
||||
## Contributing
|
||||
|
||||
Welcome to report bugs, improve code quality or submit a new feature. For more information, see [contributing guidelines](.github/CONTRIBUTING.md).
|
||||
Welcome to report bugs, help improve the code or submit new features.
|
||||
For more information, please see the ["Contributing Guidelines"][contribute-guide].
|
||||
|
||||
## Credits
|
||||
|
||||
This theme is mainly built with [Jekyll](https://jekyllrb.com/) ecosystem, [Bootstrap](https://getbootstrap.com/), [Font Awesome](https://fontawesome.com/) and some other wonderful tools (their copyright information can be found in the relevant files). The avatar and favicon design come from [Clipart Max](https://www.clipartmax.com/middle/m2i8b1m2K9Z5m2K9_ant-clipart-childrens-ant-cute/).
|
||||
This theme is mainly built with [Jekyll][jekyllrb] ecosystem,
|
||||
[Bootstrap][bootstrap], [Font Awesome][icons] and some other [wonderful tools][lib].
|
||||
The avatar and favicon design come from [Clipart Max][image].
|
||||
|
||||
:tada: Thanks to all the volunteers who contributed to this project, their GitHub IDs are on [this list](https://github.com/cotes2020/jekyll-theme-chirpy/graphs/contributors). Also, I won't forget those guys who submitted the issues or unmerged PR because they reported bugs, shared ideas, or inspired me to write more readable documentation.
|
||||
Thanks to all the [contributors][contributors]. Also, folks who submitted issues
|
||||
or unmerged PRs should not be forgotten. Because they reported bugs, shared ideas,
|
||||
or inspired me to write more readable documentation.
|
||||
|
||||
Last but not least, thank [JetBrains][jb] for providing the OSS development license.
|
||||
Last but not least, thanks to [JetBrains][jetbrains] for providing the
|
||||
_Open Source Development_ license.
|
||||
|
||||
## Sponsoring
|
||||
|
||||
If you like it, please consider sponsoring me. It will help me to maintain this project better and I would be very grateful!
|
||||
If you would like to sponsor this project, the following options are available.
|
||||
|
||||
[![Ko-fi](https://img.shields.io/badge/-Buy%20Me%20a%20Coffee-ff5f5f?logo=ko-fi&logoColor=white)](https://ko-fi.com/coteschung)
|
||||
[![Wechat Pay](https://img.shields.io/badge/-Tip%20Me%20on%20WeChat-brightgreen?logo=wechat&logoColor=white)][cn-donation]
|
||||
[![Alipay](https://img.shields.io/badge/-Tip%20Me%20on%20Alipay-blue?logo=alipay&logoColor=white)][cn-donation]
|
||||
[![Wechat Pay](https://img.shields.io/badge/-Tip%20Me%20on%20WeChat-brightgreen?logo=wechat&logoColor=white)][donation]
|
||||
[![Alipay](https://img.shields.io/badge/-Tip%20Me%20on%20Alipay-blue?logo=alipay&logoColor=white)][donation]
|
||||
|
||||
## License
|
||||
|
||||
This work is published under [MIT](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE) License.
|
||||
This work is published under [MIT][mit] License.
|
||||
|
||||
<!-- ReadMe links -->
|
||||
|
||||
[jb]: https://www.jetbrains.com/?from=jekyll-theme-chirpy
|
||||
[cn-donation]: https://sponsor.cotes.page/
|
||||
[jekyllrb]: https://jekyllrb.com/
|
||||
[bootstrap]: https://getbootstrap.com/
|
||||
[icons]: https://fontawesome.com/
|
||||
[image]: https://www.clipartmax.com/middle/m2i8b1m2K9Z5m2K9_ant-clipart-childrens-ant-cute/
|
||||
[demo]: https://cotes2020.github.io/chirpy-demo/
|
||||
[wiki]: https://github.com/cotes2020/jekyll-theme-chirpy/wiki
|
||||
[contribute-guide]: https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/.github/CONTRIBUTING.md
|
||||
[contributors]: https://github.com/cotes2020/jekyll-theme-chirpy/graphs/contributors
|
||||
[lib]: https://github.com/cotes2020/chirpy-static-assets
|
||||
[jetbrains]: https://www.jetbrains.com/?from=jekyll-theme-chirpy
|
||||
[donation]: https://sponsor.cotes.page/
|
||||
[mit]: https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE
|
||||
|
|
Loading…
Reference in a new issue