Skip to content

Commit a098571

Browse files
authored
Initial commit
0 parents  commit a098571

27 files changed

+824
-0
lines changed

.devcontainer/devcontainer.json

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "Jekyll",
3+
"image": "mcr.microsoft.com/devcontainers/jekyll:2-bullseye",
4+
"onCreateCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}",
5+
"postCreateCommand": "bash .devcontainer/post-create.sh",
6+
"customizations": {
7+
"vscode": {
8+
"settings": {
9+
"terminal.integrated.defaultProfile.linux": "zsh"
10+
},
11+
"extensions": [
12+
// Liquid tags auto-complete
13+
"killalau.vscode-liquid-snippets",
14+
// Liquid syntax highlighting and formatting
15+
"Shopify.theme-check-vscode",
16+
// Shell
17+
"timonwong.shellcheck",
18+
"mkhl.shfmt",
19+
// Common formatter
20+
"EditorConfig.EditorConfig",
21+
"esbenp.prettier-vscode",
22+
"stylelint.vscode-stylelint",
23+
"yzhang.markdown-all-in-one",
24+
// Git
25+
"mhutchie.git-graph"
26+
]
27+
}
28+
}
29+
}

.devcontainer/post-create.sh

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
3+
if [ -f package.json ]; then
4+
bash -i -c "nvm install --lts && nvm install-latest-npm"
5+
npm i
6+
npm run build
7+
fi
8+
9+
# Install dependencies for shfmt extension
10+
curl -sS https://webi.sh/shfmt | sh &>/dev/null
11+
12+
# Add OMZ plugins
13+
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
14+
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
15+
sed -i -E "s/^(plugins=\()(git)(\))/\1\2 zsh-syntax-highlighting zsh-autosuggestions\3/" ~/.zshrc
16+
17+
# Avoid git log use less
18+
echo -e "\nunset LESS" >>~/.zshrc

.editorconfig

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
trim_trailing_whitespace = true
8+
# Unix-style newlines with a newline ending every file
9+
end_of_line = lf
10+
insert_final_newline = true
11+
12+
[*.{js,css,scss}]
13+
quote_type = single
14+
15+
[*.{yml,yaml}]
16+
quote_type = double
17+
18+
[*.md]
19+
trim_trailing_whitespace = false

.gitattributes

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Set default behavior to automatically normalize line endings.
2+
* text=auto
3+
4+
# Force bash scripts to always use LF line endings so that if a repo is accessed
5+
# in Unix via a file share from Windows, the scripts will work.
6+
*.sh text eol=lf
7+
8+
# Force batch scripts to always use CRLF line endings so that if a repo is accessed
9+
# in Windows via a file share from Linux, the scripts will work.
10+
*.{cmd,[cC][mM][dD]} text eol=crlf
11+
*.{bat,[bB][aA][tT]} text eol=crlf
12+
13+
# Denote all files that are truly binary and should not be modified.
14+
*.png binary
15+
*.jpg binary
16+
*.ico binary

.github/workflows/pages-deploy.yml

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: "Build and Deploy"
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- master
7+
paths-ignore:
8+
- .gitignore
9+
- README.md
10+
- LICENSE
11+
12+
# Allows you to run this workflow manually from the Actions tab
13+
workflow_dispatch:
14+
15+
permissions:
16+
contents: read
17+
pages: write
18+
id-token: write
19+
20+
# Allow one concurrent deployment
21+
concurrency:
22+
group: "pages"
23+
cancel-in-progress: true
24+
25+
jobs:
26+
build:
27+
runs-on: ubuntu-latest
28+
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v4
32+
with:
33+
fetch-depth: 0
34+
# submodules: true
35+
# If using the 'assets' git submodule from Chirpy Starter, uncomment above
36+
# (See: https://github.com/cotes2020/chirpy-starter/tree/main/assets)
37+
38+
- name: Setup Pages
39+
id: pages
40+
uses: actions/configure-pages@v4
41+
42+
- name: Setup Ruby
43+
uses: ruby/setup-ruby@v1
44+
with:
45+
ruby-version: 3.3
46+
bundler-cache: true
47+
48+
- name: Build site
49+
run: bundle exec jekyll b -d "_site${{ steps.pages.outputs.base_path }}"
50+
env:
51+
JEKYLL_ENV: "production"
52+
53+
- name: Test site
54+
run: |
55+
bundle exec htmlproofer _site \
56+
\-\-disable-external \
57+
\-\-ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/"
58+
59+
- name: Upload site artifact
60+
uses: actions/upload-pages-artifact@v3
61+
with:
62+
path: "_site${{ steps.pages.outputs.base_path }}"
63+
64+
deploy:
65+
environment:
66+
name: github-pages
67+
url: ${{ steps.deployment.outputs.page_url }}
68+
runs-on: ubuntu-latest
69+
needs: build
70+
steps:
71+
- name: Deploy to GitHub Pages
72+
id: deployment
73+
uses: actions/deploy-pages@v4

.gitignore

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Bundler cache
2+
.bundle
3+
vendor
4+
Gemfile.lock
5+
6+
# Jekyll cache
7+
.jekyll-cache
8+
.jekyll-metadata
9+
_site
10+
11+
# RubyGems
12+
*.gem
13+
14+
# NPM dependencies
15+
node_modules
16+
package-lock.json
17+
18+
# IDE configurations
19+
.idea
20+
.vscode/*
21+
!.vscode/settings.json
22+
!.vscode/extensions.json
23+
!.vscode/tasks.json
24+
25+
# Misc
26+
_sass/vendors
27+
assets/js/dist

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "assets/lib"]
2+
path = assets/lib
3+
url = https://github.com/cotes2020/chirpy-static-assets.git

.nojekyll

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

.vscode/extensions.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["ms-vscode-remote.remote-containers"]
3+
}

.vscode/settings.json

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
// Prettier
3+
"editor.defaultFormatter": "esbenp.prettier-vscode",
4+
"editor.formatOnSave": true,
5+
// Shopify Liquid
6+
"files.associations": {
7+
"*.html": "liquid"
8+
},
9+
"[markdown]": {
10+
"editor.defaultFormatter": "yzhang.markdown-all-in-one"
11+
},
12+
// Formatter
13+
"[html][liquid]": {
14+
"editor.defaultFormatter": "Shopify.theme-check-vscode"
15+
},
16+
"[shellscript]": {
17+
"editor.defaultFormatter": "mkhl.shfmt"
18+
},
19+
// Disable vscode built-in stylelint
20+
"css.validate": false,
21+
"scss.validate": false,
22+
"less.validate": false,
23+
// Stylint extension settings
24+
"stylelint.snippet": ["css", "scss"],
25+
"stylelint.validate": ["css", "scss"],
26+
// Run tasks in macOS
27+
"terminal.integrated.profiles.osx": {
28+
"zsh": { "path": "/bin/zsh", "args": ["-l", "-i"] }
29+
}
30+
}

.vscode/tasks.json

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "Run Jekyll Server",
6+
"type": "shell",
7+
"command": "./tools/run.sh",
8+
"group": {
9+
"kind": "build",
10+
"isDefault": true
11+
},
12+
"problemMatcher": [],
13+
"detail": "Runs the Jekyll server with live reload."
14+
},
15+
{
16+
"label": "Build Jekyll Site",
17+
"type": "shell",
18+
"command": "./tools/test.sh",
19+
"group": {
20+
"kind": "build"
21+
},
22+
"problemMatcher": [],
23+
"detail": "Build the Jekyll site for production."
24+
}
25+
]
26+
}

Gemfile

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# frozen_string_literal: true
2+
3+
source "https://rubygems.org"
4+
5+
gem "jekyll-theme-chirpy", "~> 7.2"
6+
7+
gem "html-proofer", "~> 5.0", group: :test
8+
9+
platforms :mingw, :x64_mingw, :mswin, :jruby do
10+
gem "tzinfo", ">= 1", "< 3"
11+
gem "tzinfo-data"
12+
end
13+
14+
gem "wdm", "~> 0.2.0", :platforms => [:mingw, :x64_mingw, :mswin]

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 Cotes Chung
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Chirpy Starter
2+
3+
[![Gem Version](https://img.shields.io/gem/v/jekyll-theme-chirpy)][gem]&nbsp;
4+
[![GitHub license](https://img.shields.io/github/license/cotes2020/chirpy-starter.svg?color=blue)][mit]
5+
6+
When installing the [**Chirpy**][chirpy] theme through [RubyGems.org][gem], Jekyll can only read files in the folders
7+
`_data`, `_layouts`, `_includes`, `_sass` and `assets`, as well as a small part of options of the `_config.yml` file
8+
from the theme's gem. If you have ever installed this theme gem, you can use the command
9+
`bundle info --path jekyll-theme-chirpy` to locate these files.
10+
11+
The Jekyll team claims that this is to leave the ball in the user’s court, but this also results in users not being
12+
able to enjoy the out-of-the-box experience when using feature-rich themes.
13+
14+
To fully use all the features of **Chirpy**, you need to copy the other critical files from the theme's gem to your
15+
Jekyll site. The following is a list of targets:
16+
17+
```shell
18+
.
19+
├── _config.yml
20+
├── _plugins
21+
├── _tabs
22+
└── index.html
23+
```
24+
25+
To save you time, and also in case you lose some files while copying, we extract those files/configurations of the
26+
latest version of the **Chirpy** theme and the [CD][CD] workflow to here, so that you can start writing in minutes.
27+
28+
## Usage
29+
30+
Check out the [theme's docs](https://github.com/cotes2020/jekyll-theme-chirpy/wiki).
31+
32+
## Contributing
33+
34+
This repository is automatically updated with new releases from the theme repository. If you encounter any issues or want to contribute to its improvement, please visit the [theme repository][chirpy] to provide feedback.
35+
36+
## License
37+
38+
This work is published under [MIT][mit] License.
39+
40+
[gem]: https://rubygems.org/gems/jekyll-theme-chirpy
41+
[chirpy]: https://github.com/cotes2020/jekyll-theme-chirpy/
42+
[CD]: https://en.wikipedia.org/wiki/Continuous_deployment
43+
[mit]: https://github.com/cotes2020/chirpy-starter/blob/master/LICENSE

0 commit comments

Comments
 (0)