generated from cotes2020/chirpy-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 812a977
Showing
20 changed files
with
546 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
trim_trailing_whitespace = true | ||
# Unix-style newlines with a newline ending every file | ||
end_of_line = lf | ||
insert_final_newline = true | ||
|
||
[*.{js,css,scss}] | ||
quote_type = single | ||
|
||
[*.{yml,yaml}] | ||
quote_type = double | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Set default behavior to automatically normalize line endings. | ||
* text=auto | ||
|
||
# Force bash scripts to always use LF line endings so that if a repo is accessed | ||
# in Unix via a file share from Windows, the scripts will work. | ||
*.sh text eol=lf | ||
|
||
# Force batch scripts to always use CRLF line endings so that if a repo is accessed | ||
# in Windows via a file share from Linux, the scripts will work. | ||
*.{cmd,[cC][mM][dD]} text eol=crlf | ||
*.{bat,[bB][aA][tT]} text eol=crlf | ||
|
||
# Denote all files that are truly binary and should not be modified. | ||
*.png binary | ||
*.jpg binary | ||
*.ico binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: "Build and Deploy" | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
paths-ignore: | ||
- .gitignore | ||
- README.md | ||
- LICENSE | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow one concurrent deployment | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
# submodules: true | ||
# If using the 'assets' git submodule from Chirpy Starter, uncomment above | ||
# (See: https://github.com/cotes2020/chirpy-starter/tree/main/assets) | ||
|
||
- name: Setup Pages | ||
id: pages | ||
uses: actions/configure-pages@v4 | ||
|
||
- name: Setup Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.2 | ||
bundler-cache: true | ||
|
||
- name: Build site | ||
run: bundle exec jekyll b -d "_site${{ steps.pages.outputs.base_path }}" | ||
env: | ||
JEKYLL_ENV: "production" | ||
|
||
- name: Test site | ||
run: | | ||
bundle exec htmlproofer _site \ | ||
\-\-disable-external=true \ | ||
\-\-ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/" | ||
- name: Upload site artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: "_site${{ steps.pages.outputs.base_path }}" | ||
|
||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Bundler cache | ||
.bundle | ||
vendor | ||
Gemfile.lock | ||
|
||
# Jekyll cache | ||
.jekyll-cache | ||
_site | ||
|
||
# RubyGems | ||
*.gem | ||
|
||
# NPM dependencies | ||
node_modules | ||
package-lock.json | ||
|
||
# IDE configurations | ||
.idea | ||
|
||
# Misc | ||
assets/js/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "assets/lib"] | ||
path = assets/lib | ||
url = https://github.com/cotes2020/chirpy-static-assets.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# frozen_string_literal: true | ||
|
||
source "https://rubygems.org" | ||
|
||
gem "jekyll-theme-chirpy", "~> 6.5", ">= 6.5.1" | ||
|
||
group :test do | ||
gem "html-proofer", "~> 4.4" | ||
end | ||
|
||
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem | ||
# and associated library. | ||
platforms :mingw, :x64_mingw, :mswin, :jruby do | ||
gem "tzinfo", ">= 1", "< 3" | ||
gem "tzinfo-data" | ||
end | ||
|
||
# Performance-booster for watching directories on Windows | ||
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin] | ||
|
||
# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem | ||
# do not have a Java counterpart. | ||
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2021 Cotes Chung | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Chirpy Starter | ||
|
||
[![Gem Version](https://img.shields.io/gem/v/jekyll-theme-chirpy)][gem] | ||
[![GitHub license](https://img.shields.io/github/license/cotes2020/chirpy-starter.svg?color=blue)][mit] | ||
|
||
When installing the [**Chirpy**][chirpy] theme through [RubyGems.org][gem], Jekyll can only read files in the folders | ||
`_data`, `_layouts`, `_includes`, `_sass` and `assets`, as well as a small part of options of the `_config.yml` file | ||
from the theme's gem. If you have ever installed this theme gem, you can use the command | ||
`bundle info --path jekyll-theme-chirpy` to locate these files. | ||
|
||
The Jekyll team claims that this is to leave the ball in the user’s court, but this also results in users not being | ||
able to enjoy the out-of-the-box experience when using feature-rich themes. | ||
|
||
To fully use all the features of **Chirpy**, you need to copy the other critical files from the theme's gem to your | ||
Jekyll site. The following is a list of targets: | ||
|
||
```shell | ||
. | ||
├── _config.yml | ||
├── _plugins | ||
├── _tabs | ||
└── index.html | ||
``` | ||
|
||
To save you time, and also in case you lose some files while copying, we extract those files/configurations of the | ||
latest version of the **Chirpy** theme and the [CD][CD] workflow to here, so that you can start writing in minutes. | ||
|
||
## Prerequisites | ||
|
||
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. | ||
|
||
## Installation | ||
|
||
Sign in to GitHub and [**use this template**][use-template] to generate a brand new repository and name it | ||
`USERNAME.github.io`, where `USERNAME` represents your GitHub username. | ||
|
||
Then clone it to your local machine and run: | ||
|
||
```console | ||
$ bundle | ||
``` | ||
|
||
## Usage | ||
|
||
Please see the [theme's docs](https://github.com/cotes2020/jekyll-theme-chirpy#documentation). | ||
|
||
## License | ||
|
||
This work is published under [MIT][mit] License. | ||
|
||
[gem]: https://rubygems.org/gems/jekyll-theme-chirpy | ||
[chirpy]: https://github.com/cotes2020/jekyll-theme-chirpy/ | ||
[use-template]: https://github.com/cotes2020/chirpy-starter/generate | ||
[CD]: https://en.wikipedia.org/wiki/Continuous_deployment | ||
[mit]: https://github.com/cotes2020/chirpy-starter/blob/master/LICENSE |
Oops, something went wrong.