Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "Jekyll",
"image": "mcr.microsoft.com/devcontainers/jekyll:2-bullseye",
"onCreateCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}",
"postCreateCommand": "bash .devcontainer/post-create.sh",
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.defaultProfile.linux": "zsh"
},
"extensions": [
// Liquid tags auto-complete
"killalau.vscode-liquid-snippets",
// Liquid syntax highlighting and formatting
"Shopify.theme-check-vscode",
// Shell
"timonwong.shellcheck",
"mkhl.shfmt",
// Common formatter
"EditorConfig.EditorConfig",
"esbenp.prettier-vscode",
"stylelint.vscode-stylelint",
"yzhang.markdown-all-in-one",
// Git
"mhutchie.git-graph"
]
}
}
}
18 changes: 18 additions & 0 deletions .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

if [ -f package.json ]; then
bash -i -c "nvm install --lts && nvm install-latest-npm"
npm i
npm run build
fi

# Install dependencies for shfmt extension
curl -sS https://webi.sh/shfmt | sh &>/dev/null

# Add OMZ plugins
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
sed -i -E "s/^(plugins=\()(git)(\))/\1\2 zsh-syntax-highlighting zsh-autosuggestions\3/" ~/.zshrc

# Avoid git log use less
echo -e "\nunset LESS" >>~/.zshrc
19 changes: 11 additions & 8 deletions .github/workflows/pages-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ name: "Build and Deploy"
on:
push:
branches:
- prod
#- main # Possible Issue: https://github.com/cotes2020/jekyll-theme-chirpy/issues/502#issuecomment-1060960024
- main
- master
- upgrade-v7.4.1 # Temporary for testing
paths-ignore:
- .gitignore
- README.md
Expand All @@ -28,7 +29,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
# submodules: true
Expand All @@ -37,12 +38,12 @@ jobs:

- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
uses: actions/configure-pages@v4

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3 # reads from a '.ruby-version' or '.tools-version' file if 'ruby-version' is omitted
ruby-version: 3.1.4
bundler-cache: true

- name: Build site
Expand All @@ -52,10 +53,12 @@ jobs:

- name: Test site
run: |
bundle exec htmlproofer _site --disable-external --check-html --allow_hash_href
bundle exec htmlproofer _site \
\-\-disable-external \
\-\-ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/"

- name: Upload site artifact
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v3
with:
path: "_site${{ steps.pages.outputs.base_path }}"

Expand All @@ -68,4 +71,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
uses: actions/deploy-pages@v4
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Gemfile.lock

# Jekyll cache
.jekyll-cache
.jekyll-metadata
_site

# Ruby
Expand All @@ -17,9 +18,13 @@ package-lock.json

# IDE configurations
.idea
.vscode
.vscode/*
!.vscode/settings.json
!.vscode/extensions.json
!.vscode/tasks.json

# Misc
_sass/vendors
assets/js/dist
_drafts/*
.DS_Store*
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["ms-vscode-remote.remote-containers"]
}
30 changes: 30 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
// Prettier
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
// Shopify Liquid
"files.associations": {
"*.html": "liquid"
},
"[markdown]": {
"editor.defaultFormatter": "yzhang.markdown-all-in-one"
},
// Formatter
"[html][liquid]": {
"editor.defaultFormatter": "Shopify.theme-check-vscode"
},
"[shellscript]": {
"editor.defaultFormatter": "mkhl.shfmt"
},
// Disable vscode built-in stylelint
"css.validate": false,
"scss.validate": false,
"less.validate": false,
// Stylint extension settings
"stylelint.snippet": ["css", "scss"],
"stylelint.validate": ["css", "scss"],
// Run tasks in macOS
"terminal.integrated.profiles.osx": {
"zsh": { "path": "/bin/zsh", "args": ["-l", "-i"] }
}
}
26 changes: 26 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Run Jekyll Server",
"type": "shell",
"command": "./tools/run.sh",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [],
"detail": "Runs the Jekyll server with live reload."
},
{
"label": "Build Jekyll Site",
"type": "shell",
"command": "./tools/test.sh",
"group": {
"kind": "build"
},
"problemMatcher": [],
"detail": "Build the Jekyll site for production."
}
]
}
20 changes: 3 additions & 17 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,13 @@

source "https://rubygems.org"

gem "jekyll-theme-chirpy", "~> 6.2"
gem "jekyll-theme-chirpy", "~> 7.4", ">= 7.4.1"

group :test do
gem "html-proofer", "~> 3.18"
end
gem "html-proofer", "~> 5.0", group: :test

# 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]

# Lock jekyll-sass-converter to 2.x on Linux-musl
if RUBY_PLATFORM =~ /linux-musl/
gem "jekyll-sass-converter", "~> 2.0"
end
gem "wdm", "~> 0.2.0", :platforms => [:mingw, :x64_mingw, :mswin]
17 changes: 3 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,19 @@ To fully use all the features of **Chirpy**, you need to copy the other critical

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:
## Usage

```
```console
$ bundle
```

## Usage

Please see the [theme's docs](https://github.com/cotes2020/jekyll-theme-chirpy#documentation).
Check out the [theme's docs](https://github.com/cotes2020/jekyll-theme-chirpy/wiki).

## 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
44 changes: 23 additions & 21 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ baseurl: ""

lang: en

timezone: "Europe/London"
# Change to your timezone β€Ί https://zones.arilyn.cc
timezone: "Europe/Madrid"

# jekyll-seo-tag settings β€Ί https://github.com/jekyll/jekyll-seo-tag/blob/master/docs/usage.md
# ↓ --------------------------
Expand Down Expand Up @@ -34,13 +35,20 @@ social:
- https://twitter.com/techdmac
- https://github.com/danielmacuare

google_site_verification:
webmaster_verifications:
google: # fill in your Google verification code
bing: # fill in your Bing verification code
alexa: # fill in your Alexa verification code
yandex: # fill in your Yandex verification code
baidu: # fill in your Baidu verification code
facebook: # fill in your Facebook verification code

# ↑ --------------------------
# The end of `jekyll-seo-tag` settings

google_analytics:
id: "G-XKDS3E28YE" # Google Analytics Measurement ID
analytics:
google:
id: "G-XKDS3E28YE" # Google Analytics Measurement ID

theme_mode: # System color by default

Expand All @@ -49,16 +57,17 @@ theme_mode: # System color by default
# will be added to all image (site avatar & posts' images) paths starting with '/'
#
# e.g. 'https://cdn.com'
img_cdn:
cdn:

# the avatar on sidebar, support local or CORS resources
avatar: assets/img/avatar/dmac_logo_black_bg.png

toc: true

comments:
active: # The global switch for posts comments, e.g., 'disqus'. Keep it empty means disable
# The active options are as follows:
# Global switch for the post-comment system. Keeping it empty means disabled.
provider: # [disqus | utterances | giscus]
# The provider options are as follows:
disqus:
shortname: # fill with the Disqus shortname. β€Ί https://help.disqus.com/en/articles/1717111-what-s-a-shortname
# utterances settings β€Ί https://utteranc.es/
Expand All @@ -82,7 +91,7 @@ assets:
enabled: # boolean, keep empty means false
# specify the Jekyll environment, empty means both
# only works if `assets.self_host.enabled` is 'true'
env: # [development|production]
env: # [development | production]

pwa:
enabled: true # the option for PWA feature
Expand All @@ -92,6 +101,7 @@ paginate: 10
# ------------ The following options are not recommended to be modified ------------------

kramdown:
footnote_backlink: "&#8617;&#xfe0e;"
syntax_highlighter: rouge
syntax_highlighter_opts: # Rouge Options β€Ί https://github.com/jneen/rouge#full-options
css_class: highlight
Expand Down Expand Up @@ -128,14 +138,6 @@ defaults:
values:
layout: page
permalink: /:title/
- scope:
path: assets/img/favicons
values:
swcache: true
- scope:
path: assets/js/dist
values:
swcache: true

sass:
style: compressed
Expand All @@ -152,13 +154,13 @@ compress_html:
exclude:
- "*.gem"
- "*.gemspec"
- docs
- tools
- README.md
- CHANGELOG.md
- LICENSE
- rollup.config.js
- node_modules
- package*.json
- purgecss.js
- "*.config.js"
- "package*.json"

jekyll-archives:
enabled: [categories, tags]
Expand All @@ -167,4 +169,4 @@ jekyll-archives:
tag: tag
permalinks:
tag: /tags/:name/
category: /categories/:name/
category: /categories/:name/
16 changes: 1 addition & 15 deletions _data/contact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,6 @@
- type: twitter
icon: "fab fa-twitter"

#- type: email
# icon: "fas fa-envelope"
# noblank: true # open link in current tab

- type: rss
icon: "fas fa-rss"
noblank: true
# Uncomment and complete the url below to enable more contact options
#
# - type: mastodon
# icon: 'fab fa-mastodon' # icons powered by <https://fontawesome.com/>
# url: '' # Fill with your Mastodon account page, rel="me" will be applied for verification
#
#
# - type: stack-overflow
# icon: 'fab fa-stack-overflow'
# url: '' # Fill with your stackoverflow homepage
noblank: true
1 change: 1 addition & 0 deletions _posts/.placeholder
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Loading