Skip to content

Commit

Permalink
Merge branch 'master' into production
Browse files Browse the repository at this point in the history
  • Loading branch information
cotes2020 committed Aug 27, 2024
2 parents 213d4d1 + d8eefae commit 6ae4a38
Show file tree
Hide file tree
Showing 74 changed files with 533 additions and 322 deletions.
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
13 changes: 8 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ updates:
directory: "/"
versioning-strategy: increase
groups:
npm:
update-types:
- "major"
- "minor"
- "patch"
prod-deps:
dependency-type: production
dev-deps:
dependency-type: development
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
Expand All @@ -23,3 +22,7 @@ updates:
- "major"
schedule:
interval: "weekly"
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: weekly
2 changes: 1 addition & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: latest
node-version: lts/*

- run: npm install
- run: npx semantic-release
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: latest
node-version: lts/*

- name: Build Assets
run: npm i && npm run build

- name: Test Site
run: bash tools/test
run: bash tools/test.sh
2 changes: 1 addition & 1 deletion .github/workflows/style-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: latest
node-version: lts/*
- run: npm i
- run: npm test
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ package-lock.json

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

# Misc
_sass/dist
Expand Down
5 changes: 1 addition & 4 deletions .husky/commit-msg
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no -- commitlint --edit ${1}
npx --no -- commitlint --edit $1
12 changes: 1 addition & 11 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
{
"recommendations": [
// Liquid tags auto-complete
"killalau.vscode-liquid-snippets",
// Liquid syntax highlighting and formatting
"Shopify.theme-check-vscode",
// Common formatter
"esbenp.prettier-vscode",
"foxundermoon.shell-format",
"stylelint.vscode-stylelint",
"yzhang.markdown-all-in-one"
]
"recommendations": ["ms-vscode-remote.remote-containers"]
}
11 changes: 7 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Prettier
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"prettier.trailingComma": "none",
// Shopify Liquid
"files.associations": {
"*.html": "liquid"
Expand All @@ -15,13 +14,17 @@
"editor.defaultFormatter": "Shopify.theme-check-vscode"
},
"[shellscript]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
"editor.defaultFormatter": "mkhl.shfmt"
},
// Disable vscode built-in stylelint
"css.validate": false,
"scss.validate": false,
"less.validate": false,
// Stylint extension settings
"stylelint.snippet": ["css", "less", "postcss", "scss"],
"stylelint.validate": ["css", "less", "postcss", "scss"]
"stylelint.snippet": ["css", "scss"],
"stylelint.validate": ["css", "scss"],
// Run tasks in macOS
"terminal.integrated.profiles.osx": {
"zsh": { "path": "/bin/zsh", "args": ["-l", "-i"] }
}
}
64 changes: 64 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"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."
},
{
"label": "Build JS (watch)",
"type": "shell",
"command": "npm run watch:js",
"group": {
"kind": "build"
},
"problemMatcher": [],
"detail": "Build JS files in watch mode."
},
{
"label": "Build CSS",
"type": "shell",
"command": "npm run build:css",
"group": {
"kind": "build"
},
"problemMatcher": [],
"detail": "Build CSS files."
},
{
"label": "Build JS & CSS",
"type": "shell",
"command": "npm run build",
"group": {
"kind": "build"
},
"problemMatcher": [],
"detail": "Build JS & CSS for production."
},
{
"label": "Run Jekyll Server + Build JS (watch)",
"dependsOn": ["Run Jekyll Server", "Build JS (watch)"],
"group": {
"kind": "build"
},
"detail": "Runs both the Jekyll server with live reload and build JS files in watch mode."
}
]
}
9 changes: 7 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ source "https://rubygems.org"

gemspec

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

platforms :mingw, :x64_mingw, :mswin, :jruby do
gem "tzinfo", ">= 1", "< 3"
gem "tzinfo-data"
end

gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

A minimal, responsive, and feature-rich Jekyll theme for technical writing.

[![Gem Version](https://img.shields.io/gem/v/jekyll-theme-chirpy?color=brightgreen)][gem]&nbsp;
[![CI](https://github.com/cotes2020/jekyll-theme-chirpy/actions/workflows/ci.yml/badge.svg?branch=master&event=push)][ci]&nbsp;
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/4e556876a3c54d5e8f2d2857c4f43894)][codacy]&nbsp;
[![GitHub license](https://img.shields.io/github/license/cotes2020/jekyll-theme-chirpy.svg)][license]&nbsp;
[![996.icu](https://img.shields.io/badge/link-996.icu-%23FF4D5B.svg)](https://996.icu)
[![CI](https://img.shields.io/github/actions/workflow/status/cotes2020/jekyll-theme-chirpy/ci.yml?logo=github)][ci]&nbsp;
[![Codacy Badge](https://img.shields.io/codacy/grade/4e556876a3c54d5e8f2d2857c4f43894?logo=codacy)][codacy]&nbsp;
[![GitHub license](https://img.shields.io/github/license/cotes2020/jekyll-theme-chirpy?color=goldenrod)][license]&nbsp;
[![Gem Version](https://img.shields.io/gem/v/jekyll-theme-chirpy?&logo=RubyGems&logoColor=ghostwhite&label=gem&color=orange)][gem]&nbsp;
[![Open in Dev Containers](https://img.shields.io/badge/Dev_Containers-Open-deepskyblue?logo=linuxcontainers)][open-container]

[**Live Demo**][demo]

Expand Down Expand Up @@ -72,6 +72,7 @@ This project is published under [MIT License][license].
[ci]: https://github.com/cotes2020/jekyll-theme-chirpy/actions/workflows/ci.yml?query=event%3Apush+branch%3Amaster
[codacy]: https://app.codacy.com/gh/cotes2020/jekyll-theme-chirpy/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade
[license]: https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE
[open-container]: https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/cotes2020/jekyll-theme-chirpy
[jekyllrb]: https://jekyllrb.com/
[clipartmax]: https://www.clipartmax.com/middle/m2i8b1m2K9Z5m2K9_ant-clipart-childrens-ant-cute/
[demo]: https://cotes2020.github.io/chirpy-demo/
Expand Down
30 changes: 14 additions & 16 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ timezone: Asia/Shanghai

title: Chirpy # the main title

tagline: A text-focused Jekyll theme # it will display as the sub-title
tagline: A text-focused Jekyll theme # it will display as the subtitle

description: >- # used by seo meta and the atom feed
A minimal, responsive and feature-rich Jekyll theme for technical writing.
# Fill in the protocol & hostname for your site.
# e.g. 'https://username.github.io', note that it does not end with a '/'.
# E.g. 'https://username.github.io', note that it does not end with a '/'.
url: ""

github:
username: github_username # change to your github username
username: github_username # change to your GitHub username

twitter:
username: twitter_username # change to your twitter username
username: twitter_username # change to your Twitter username

social:
# Change to your full name.
Expand All @@ -38,8 +38,8 @@ social:
email: example@domain.com # change to your email address
links:
# The first element serves as the copyright owner's link
- https://twitter.com/username # change to your twitter homepage
- https://github.com/username # change to your github homepage
- https://twitter.com/username # change to your Twitter homepage
- https://github.com/username # change to your GitHub homepage
# Uncomment below to add more social links
# - https://www.facebook.com/username
# - https://www.linkedin.com/in/username
Expand Down Expand Up @@ -70,8 +70,10 @@ analytics:
domain: # fill in your Matomo domain
cloudflare:
id: # fill in your Cloudflare Web Analytics token
fathom:
id: # fill in your Fathom Site ID

# Pageviews settings
# Page views settings
pageviews:
provider: # now only supports 'goatcounter'

Expand All @@ -83,8 +85,8 @@ pageviews:
#
# Available options:
#
# light - Use the light color scheme
# dark - Use the dark color scheme
# light Use the light color scheme
# dark Use the dark color scheme
#
theme_mode: # [light | dark]

Expand All @@ -106,7 +108,7 @@ social_preview_image: # string, local or CORS resources
toc: true

comments:
# Global switch for the post comment system. Keeping it empty means disabled.
# Global switch for the post-comment system. Keeping it empty means disabled.
provider: # [disqus | utterances | giscus]
# The provider options are as follows:
disqus:
Expand Down Expand Up @@ -136,9 +138,9 @@ assets:
env: # [development | production]

pwa:
enabled: true # the option for PWA feature (installable)
enabled: true # The option for PWA feature (installable)
cache:
enabled: true # the option for PWA offline cache
enabled: true # The option for PWA offline cache
# Paths defined here will be excluded from the PWA cache.
# Usually its value is the `baseurl` of another website that
# shares the same domain name as the current website.
Expand Down Expand Up @@ -190,10 +192,6 @@ defaults:
values:
layout: page
permalink: /:title/
- scope:
path: assets/js/dist
values:
swcache: true

sass:
style: compressed
Expand Down
12 changes: 12 additions & 0 deletions _data/contact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,15 @@
# - type: stack-overflow
# icon: 'fab fa-stack-overflow'
# url: '' # Fill with your stackoverflow homepage
#
# - type: bluesky
# icon: 'fa-brands fa-bluesky'
# url: '' # Fill with your Bluesky profile link
#
# - type: reddit
# icon: 'fa-brands fa-reddit'
# url: '' # Fill with your Reddit profile link
#
# - type: threads
# icon: 'fa-brands fa-threads'
# url: '' # Fill with your Threads profile link
2 changes: 1 addition & 1 deletion _data/locales/ar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ copyright:
meta: باستخدام :PLATFORM السمة :THEME

not_found:
statment: عذرا, الرابط التالي غير صالح أو انه يشير إلى صفحة غير موجودة.
statement: عذرا, الرابط التالي غير صالح أو انه يشير إلى صفحة غير موجودة.

notification:
update_found: يتوفر اصدار جديد للمحتوى.
Expand Down
2 changes: 1 addition & 1 deletion _data/locales/bg-BG.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ copyright:
meta: Създадено чрез :PLATFORM и :THEME тема

not_found:
statment: Съжалявам, но на този URL адрес няма налично съдържание.
statement: Съжалявам, но на този URL адрес няма налично съдържание.

notification:
update_found: Налична е нова версия на съдържанието.
Expand Down
Loading

0 comments on commit 6ae4a38

Please sign in to comment.