From 6da97d7f45dd0e0176d13c74e7d7cd8d0fae7d41 Mon Sep 17 00:00:00 2001 From: Eduard Tolosa Date: Tue, 28 Jan 2025 12:30:13 -0500 Subject: [PATCH] Squashed commit of the following: commit 46e2bdfa6eacc084dcafe95197339c2705a1d17d Author: GitHub Actions Date: Sat Dec 21 19:23:15 2024 +0000 Update critical file(s) according to Chirpy v7.2.4 commit 1d4d35af851aa6f7d2bd2d5b30e22fefdae8689d Author: GitHub Actions Date: Sun Dec 15 13:06:48 2024 +0000 Update critical file(s) according to Chirpy v7.2.3 commit aa0fd48ad0de60984ecdd04961d931c490d2b80a Author: GitHub Actions Date: Fri Dec 6 17:07:40 2024 +0000 Update critical file(s) according to Chirpy v7.2.2 commit 333ce4603ed85585cb8c93a7001951af43e0362b Author: GitHub Actions Date: Thu Dec 5 13:34:44 2024 +0000 Update critical file(s) according to Chirpy v7.2.1 commit 59ad287fb0144fd9a3e1b46826a18fdce42646d1 Author: GitHub Actions Date: Thu Nov 28 09:00:29 2024 +0000 Update critical file(s) according to Chirpy v7.2.0 commit 7ab45bd41f5811316714825105f3575fa7d415cd Author: GitHub Actions Date: Mon Sep 23 12:05:45 2024 +0000 Update critical file(s) according to Chirpy v7.1.1 commit 6ae78258092c8e1b1b30f53bbc9ce8ba98703e78 Author: GitHub Actions Date: Sun Sep 1 12:45:16 2024 +0000 Update critical file(s) according to Chirpy v7.1.0 commit 00252fd7b8701a2274fcdc90a8555a1ae19a0b1e Author: GitHub Actions Date: Sat May 18 11:02:10 2024 +0000 Update critical file(s) according to Chirpy v7.0.1 commit 32f4cbe2f7318501848edda9431144a9cbe796af Author: GitHub Actions Date: Sat May 11 08:16:14 2024 +0000 Update critical file(s) according to Chirpy v7.0.0 commit 88378f61690c392718733d6efc819c1b699ac53c Author: GitHub Actions Date: Sat Mar 23 18:32:27 2024 +0000 Update critical file(s) according to Chirpy v6.5.5 commit 586b285258a99c7ed0145b3d9f20779913db04f7 Author: GitHub Actions Date: Fri Mar 22 19:45:34 2024 +0000 Update critical file(s) according to Chirpy v6.5.4 commit c403568b4c11c6585c260e98a142658039ecdf17 Author: GitHub Actions Date: Thu Mar 7 20:15:44 2024 +0000 Update critical file(s) according to Chirpy v6.5.3 commit b8605de1ba6de5a66b5a6ad4b3ca6264b2d7b730 Author: GitHub Actions Date: Thu Feb 29 19:53:46 2024 +0000 Update critical file(s) according to Chirpy v6.5.2 commit 953dbb08e36148ed4fbb813c9a0ca2d2a0f75a51 Author: GitHub Actions Date: Mon Feb 26 18:21:19 2024 +0000 Update critical file(s) according to Chirpy v6.5.1 commit b160f258a0fc8150e5113f37b001ecb8aeb7c309 Author: GitHub Actions Date: Wed Feb 14 16:21:01 2024 +0000 Update critical file(s) according to Chirpy v6.5.0 commit 8486ea4ae455a2e7cb334fe64a75c8b2a787560c Author: GitHub Actions Date: Sat Jan 13 14:04:21 2024 +0000 Update critical file(s) according to Chirpy v6.4.2 commit 756d37c648011b102cea565c92e7ee3e8e2f3314 Author: GitHub Actions Date: Wed Jan 10 18:13:49 2024 +0000 Update critical file(s) according to Chirpy v6.4.1 commit d03f0bbcc7e6a8a81927ad592665b50baf048ff4 Author: GitHub Actions Date: Wed Jan 10 15:12:49 2024 +0000 Update critical file(s) according to Chirpy v6.4.0 commit 1efe631e7ed0b977f773f243233312335103162f Author: Dmitry Kosarev Date: Thu Dec 28 10:03:08 2023 +0100 build(deps): specify the minor version number of ruby (#15) See also: https://github.com/cotes2020/jekyll-theme-chirpy/pull/1431 Co-authored-by: Dmitry Kosarev commit 1565392b7ef235b699c7ff45433dc1c295501dab Author: GitHub Actions Date: Sun Nov 12 21:17:50 2023 +0000 Update critical file(s) according to Chirpy v6.3.1 commit aea4a8fc594e5adc79da157a3aad72fe92901c85 Author: GitHub Actions Date: Fri Nov 10 12:16:23 2023 +0000 Update critical file(s) according to Chirpy v6.3.0 commit f05cdc55b90a9a079d56cab042c914e0706e839c Author: GitHub Actions Date: Tue Oct 10 04:56:49 2023 +0000 Update critical file(s) according to Chirpy v6.2.3 commit bcb2c56f84502ec60e946dc4f15b3f6e7fd6c6f4 Author: GitHub Actions Date: Sun Sep 10 18:40:05 2023 +0000 Update critical file(s) according to Chirpy v6.2.2 commit c3ef0634163415d93430fcbe474bd3d18d88c9b8 Author: GitHub Actions Date: Sun Sep 10 16:43:47 2023 +0000 Update critical file(s) according to Chirpy v6.2.1 commit 74bf950ae0fa49baf80110bf831a0b2424bee806 Author: GitHub Actions Date: Sun Sep 10 13:24:09 2023 +0000 Update critical file(s) according to Chirpy v6.2.0 commit 2605fedb3f801839e2af7ebff45d110cc7d651b5 Author: GitHub Actions Date: Sun Jul 2 13:52:03 2023 +0000 Update critical file(s) according to Chirpy v6.1.0 commit 7c3f58dd0837c2116275458b16716a0b958cd409 Author: GitHub Actions Date: Fri May 19 16:50:33 2023 +0000 Update critical file(s) according to Chirpy v6.0.1 commit 3c5c4e973311e62d0b4944f70c96ee52e48a5b08 Author: GitHub Actions Date: Tue May 16 19:05:24 2023 +0000 Update critical file(s) according to Chirpy v6.0.0 commit 918d7a0bba571e548c0278d371c4d2cbd3d995c3 Author: GitHub Actions Date: Thu Mar 30 21:48:39 2023 +0000 Update critical file(s) according to Chirpy v5.6.1 commit ff0f0b801e185e8158d17bccd9d4670c0d680a3d Author: GitHub Actions Date: Fri Mar 17 18:23:14 2023 +0000 Update critical file(s) according to Chirpy v5.6.0 commit 85116817d18605cb14181774f798c0b37e52fdd0 Author: GitHub Actions Date: Sun Feb 5 19:18:58 2023 +0000 Update critical file(s) according to Chirpy v5.5.2 commit afc1abfdd5acbf542923e66ac6fe9f66ab24fd08 Author: GitHub Actions Date: Sun Jan 29 22:18:12 2023 +0000 Update critical file(s) according to Chirpy v5.5.1 commit 1832a369aaa19bf67a7ea5f7679cc69fc43540ed Author: GitHub Actions Date: Sun Jan 29 21:05:40 2023 +0000 Update critical file(s) according to Chirpy v5.5.0 commit 02a5de7732e340f1ae03d9442479ead5c12cfd50 Author: GitHub Actions Date: Tue Dec 27 17:32:37 2022 +0000 Update critical file(s) according to Chirpy v5.4.0 commit 9b2c9badce3f4f669d41006433d8067f60803aef Author: GitHub Actions Date: Fri Nov 25 15:03:09 2022 +0000 Update critical file(s) according to Chirpy v5.3.2 commit d9428918eda59f796d89fb3bd9af07c0f901f55d Author: Travis-CI Date: Tue Oct 25 13:31:31 2022 +0000 Update critical file(s) according to Chirpy v5.3.1 commit 1b74cf9a365666bb017ea0db2e3511db5b56e913 Author: Travis-CI Date: Fri Sep 23 13:58:58 2022 +0000 Update critical file(s) according to Chirpy v5.3.0 commit e6a207db1613c309f319f1b74eacef6e53300238 Author: Travis-CI Date: Fri Jun 17 16:17:19 2022 +0000 Update critical file(s) according to Chirpy v5.2.1 commit 6c8b7ca51f03d99a6e16dc86494ab2fcedfb941a Author: Travis-CI Date: Thu Jun 9 10:06:34 2022 +0000 Update critical file(s) according to Chirpy v5.2.0 commit d1ef8d42739913443a0d1ba4e0c436d31840d2b9 Author: Travis-CI Date: Mon Feb 14 17:30:02 2022 +0000 Update critical file(s) according to Chirpy v5.1.0 commit 3b07fccfc4e5c07fac7ae40c8a87048298c62406 Author: Travis-CI Date: Fri Jan 7 18:52:12 2022 +0000 Update critical file(s) according to Chirpy v5.0.2 commit a8cd88041dbfddb4a4b6488eb98750bceba7f014 Author: Travis-CI Date: Tue Jan 4 19:50:28 2022 +0000 Update critical file(s) according to Chirpy v5.0.1 commit fc54bc5574dbc26e9dcdb3f07f53eb9287647002 Author: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Tue Jan 4 18:58:29 2022 +0800 Update the doc's link in README commit bf93d1383d93057ec179714604bafe30f687e539 Author: Travis-CI Date: Sun Jan 2 16:53:02 2022 +0000 Update critical file(s) according to Chirpy v5.0.0 commit 23942a94b3542d38b53b94421e0cc926ae2fdcc0 Author: Travis-CI Date: Mon Nov 29 12:35:47 2021 +0000 Update critical file(s) according to Chirpy v4.3.4 commit 66a784cb717872dba77830fab476c39013a80867 Author: Travis-CI Date: Sun Oct 24 20:18:05 2021 +0000 Update critical file(s) according to Chirpy v4.3.3 commit b8446c9b7baabca6357966510febd7989eca2cb5 Author: Travis-CI Date: Thu Oct 14 18:13:57 2021 +0000 Update critical file(s) according to Chirpy v4.3.2 commit 479cdc35c7879911d80cb63e1ffd5d526ce321e4 Author: Travis-CI Date: Fri Oct 1 10:58:50 2021 +0000 Update critical file(s) according to Chirpy v4.3.1 commit ff4185924018f32f03880b183bd3dff0997edd13 Author: Travis-CI Date: Wed Sep 29 20:03:26 2021 +0000 Update critical file(s) according to Chirpy v4.3.0 commit c2a7480e653aa82d1747091154c3307a4676c11c Author: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Sun Sep 26 01:20:50 2021 +0800 Update README commit 4abf09ed60696ed4fc5239f274dea39a2308ad03 Author: Travis-CI Date: Thu Sep 16 13:22:01 2021 +0000 Update critical file(s) according to Chirpy v4.2.1 commit 2327ec8d83c41be38ec5fce69629edd694467f83 Author: Travis-CI Date: Wed Sep 15 17:53:28 2021 +0000 Update critical file(s) according to Chirpy v4.2.0 commit 45ff5ba1bff28691f6ceb9baf5c5206eddbc38a7 Author: Travis-CI Date: Mon Aug 9 08:49:14 2021 +0000 Update critical file(s) according to Chirpy v4.1.1 commit 1d16d381fdd5e00e26f77961c5dbd047dd7eb076 Author: Travis-CI Date: Wed Jul 21 16:54:21 2021 +0000 Update critical file(s) according to Chirpy v4.1.0 commit 1a82b8970f71a57d6a1dbfb65221cd47e9be74d8 Author: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Wed Jul 21 22:33:34 2021 +0800 Update README commit d84dd10ca5a92ddfac3fa344e236d1e75e79112c Author: Travis-CI Date: Wed Jun 23 16:55:07 2021 +0000 Update critical file(s) according to Chirpy v4.0.2 commit 14988e3c10e7118b2ab154eb31c414dfe608b414 Author: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Wed Jun 23 23:26:23 2021 +0800 Update README commit 53ccb821cbddf68f02abc853e5ba1aae3747d147 Author: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Fri Jun 4 19:42:36 2021 +0800 Improve the gitignore commit 81cfa313af234ea7674db0249d2e730ca03a29ae Author: Chao Xiang Date: Tue May 11 21:46:25 2021 +0800 fix usage on Customing Stylesheet commit c9806df6fade19e6498cfdf83707767d345eb185 Author: Travis-CI Date: Fri May 7 19:36:50 2021 +0000 Update critical file(s) according to Chirpy v4.0.1 commit 67a9ca60de795161ba58e59bd6fc063e9e8d2d8d Author: Travis-CI Date: Fri Apr 30 06:22:50 2021 +0000 Update critical file(s) according to Chirpy v4.0.0 commit e6b807ee6fe508c800d58ceb0c01b4ba6eaf437c Author: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Fri Apr 30 14:08:12 2021 +0800 Update README to v4.0.0 commit 15f6f7160c91a6344f79e9072565e65c77ba6658 Author: Travis-CI Date: Fri Apr 2 08:29:15 2021 +0000 Update critical file(s) according to Chirpy v3.3.0 commit 1d7d7cffacea7553dbca892600181b01a9080495 Author: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Thu Apr 1 04:09:47 2021 +0800 Update the ruby setup in gh-actions commit dff8e090898fe5274d6d2ed0baf4fa1d8c1a357d Author: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Mon Mar 1 19:08:40 2021 +0800 Update the Gemfile commit 565ce4422e1ab970cdfaf1fb33e8b079fa6d170d Author: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Thu Feb 11 02:58:14 2021 +0800 Fix the license link in readme commit 31ed013043884262832077ef22179bfb54f75dd3 Author: Travis-CI Date: Wed Feb 10 13:36:18 2021 +0000 [Automation] Update critical file(s) according to Chirpy v3.2.0 commit 3c4df16c5c3dbb8d30b8a140e7f7500bd877e1ea Author: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Fri Feb 5 22:42:29 2021 +0800 Improve the readme commit 4bbd30da309c44e80b9a512a44347d1cdfa63d7b Author: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Wed Feb 3 20:12:23 2021 +0800 Update 404.html according to the theme (v3.1.0) commit 7a2365cf12c9632a7ae99b3a0d639506b88ed7fd Author: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Tue Feb 2 01:37:35 2021 +0800 Update the site config according to the theme (v3.1.0) commit 32cd3112ba34a8bad9906633a26519a8694a4b0f Author: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Tue Jan 26 05:13:40 2021 +0800 Init commit --- .devcontainer/devcontainer.json | 29 ++++++++++ .devcontainer/post-create.sh | 18 ++++++ .github/workflows/pages-deploy.yml | 4 +- .gitignore | 7 ++- .vscode/extensions.json | 3 + .vscode/settings.json | 30 ++++++++++ .vscode/tasks.json | 26 +++++++++ Gemfile | 16 +----- README.md | 40 +++++++------- _data/contact.yml | 14 ++++- _data/share.yml | 28 ++++++---- tools/run.sh | 54 ++++++++++++++++++ tools/test.sh | 89 ++++++++++++++++++++++++++++++ 13 files changed, 310 insertions(+), 48 deletions(-) create mode 100644 .devcontainer/devcontainer.json create mode 100644 .devcontainer/post-create.sh create mode 100644 .vscode/extensions.json create mode 100644 .vscode/settings.json create mode 100644 .vscode/tasks.json create mode 100755 tools/run.sh create mode 100755 tools/test.sh diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..39c428d --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -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" + ] + } + } +} diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh new file mode 100644 index 0000000..a4bc282 --- /dev/null +++ b/.devcontainer/post-create.sh @@ -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 diff --git a/.github/workflows/pages-deploy.yml b/.github/workflows/pages-deploy.yml index c33b2a6..cc28f99 100644 --- a/.github/workflows/pages-deploy.yml +++ b/.github/workflows/pages-deploy.yml @@ -42,7 +42,7 @@ jobs: - name: Setup Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 3.2 + ruby-version: 3.3 bundler-cache: true - name: Build site @@ -53,7 +53,7 @@ jobs: - name: Test site run: | bundle exec htmlproofer _site \ - \-\-disable-external=true \ + \-\-disable-external \ \-\-ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/" - name: Upload site artifact diff --git a/.gitignore b/.gitignore index 0124b68..7dd7cef 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ Gemfile.lock # Jekyll cache .jekyll-cache +.jekyll-metadata _site # RubyGems @@ -16,7 +17,11 @@ package-lock.json # IDE configurations .idea -.vscode +.vscode/* +!.vscode/settings.json +!.vscode/extensions.json +!.vscode/tasks.json # Misc +_sass/vendors assets/js/dist diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..082bc94 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["ms-vscode-remote.remote-containers"] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..5e8a04f --- /dev/null +++ b/.vscode/settings.json @@ -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"] } + } +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..7f0fdb8 --- /dev/null +++ b/.vscode/tasks.json @@ -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." + } + ] +} diff --git a/Gemfile b/Gemfile index 62d6fe4..7835d7d 100644 --- a/Gemfile +++ b/Gemfile @@ -2,23 +2,13 @@ source "https://rubygems.org" -gem "jekyll-theme-chirpy", "~> 6.5", ">= 6.5.5" -gem 'jekyll-compose', group: [:jekyll_plugins] +gem "jekyll-theme-chirpy", "~> 7.2", ">= 7.2.4" -group :test do - gem "html-proofer", "~> 4.4" -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] +gem "wdm", "~> 0.2.0", :platforms => [:mingw, :x64_mingw, :mswin] diff --git a/README.md b/README.md index 9b4e987..793cd08 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,18 @@ -# Chirpy Starter [![Gem Version](https://img.shields.io/gem/v/jekyll-theme-chirpy)](https://rubygems.org/gems/jekyll-theme-chirpy) [![GitHub license](https://img.shields.io/github/license/cotes2020/chirpy-starter.svg?color=blue)][mit] +# Chirpy Starter -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. +[![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] -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. +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. -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: +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 . @@ -14,25 +22,16 @@ To fully use all the features of **Chirpy**, you need to copy the other critical └── 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: - -``` -$ bundle -``` +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. ## 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). + +## Contributing + +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. ## License @@ -40,6 +39,5 @@ 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 diff --git a/_data/contact.yml b/_data/contact.yml index d584334..138ec08 100644 --- a/_data/contact.yml +++ b/_data/contact.yml @@ -4,7 +4,7 @@ icon: "fab fa-github" - type: twitter - icon: "fab fa-twitter" + icon: "fa-brands fa-x-twitter" - type: email icon: "fas fa-envelope" @@ -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 diff --git a/_data/share.yml b/_data/share.yml index 330fb6d..de1d3e8 100644 --- a/_data/share.yml +++ b/_data/share.yml @@ -15,11 +15,15 @@ platforms: link: "https://t.me/share/url?url=URL&text=TITLE" # Uncomment below if you need to. - # + - type: Linkedin icon: "fab fa-linkedin" link: "https://www.linkedin.com/sharing/share-offsite/?url=URL" - + + - type: Weibo + icon: "fab fa-weibo" + link: "https://service.weibo.com/share/share.php?title=TITLE&url=URL" + - type: Mastodon icon: "fa-brands fa-mastodon" # See: https://github.com/justinribeiro/share-to-mastodon#properties @@ -32,11 +36,15 @@ platforms: link: "https://fosstodon.org/" - label: photog.social link: "https://photog.social/" - - label: infosec.exchange - link: "https://infosec.exchange/" - - # - # - type: Weibo - # icon: "fab fa-weibo" - # link: "http://service.weibo.com/share/share.php?title=TITLE&url=URL" - # + + - type: Bluesky + icon: "fa-brands fa-bluesky" + link: "https://bsky.app/intent/compose?text=TITLE%20URL" + + - type: Reddit + icon: "fa-brands fa-square-reddit" + link: "https://www.reddit.com/submit?url=URL&title=TITLE" + + - type: Threads + icon: "fa-brands fa-square-threads" + link: "https://www.threads.net/intent/post?text=TITLE%20URL" diff --git a/tools/run.sh b/tools/run.sh new file mode 100755 index 0000000..0efc452 --- /dev/null +++ b/tools/run.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash +# +# Run jekyll serve and then launch the site + +prod=false +command="bundle exec jekyll s -l" +host="127.0.0.1" + +help() { + echo "Usage:" + echo + echo " bash /path/to/run [options]" + echo + echo "Options:" + echo " -H, --host [HOST] Host to bind to." + echo " -p, --production Run Jekyll in 'production' mode." + echo " -h, --help Print this help information." +} + +while (($#)); do + opt="$1" + case $opt in + -H | --host) + host="$2" + shift 2 + ;; + -p | --production) + prod=true + shift + ;; + -h | --help) + help + exit 0 + ;; + *) + echo -e "> Unknown option: '$opt'\n" + help + exit 1 + ;; + esac +done + +command="$command -H $host" + +if $prod; then + command="JEKYLL_ENV=production $command" +fi + +if [ -e /proc/1/cgroup ] && grep -q docker /proc/1/cgroup; then + command="$command --force_polling" +fi + +echo -e "\n> $command\n" +eval "$command" diff --git a/tools/test.sh b/tools/test.sh new file mode 100755 index 0000000..331de1c --- /dev/null +++ b/tools/test.sh @@ -0,0 +1,89 @@ +#!/usr/bin/env bash +# +# Build and test the site content +# +# Requirement: html-proofer, jekyll +# +# Usage: See help information + +set -eu + +SITE_DIR="_site" + +_config="_config.yml" + +_baseurl="" + +help() { + echo "Build and test the site content" + echo + echo "Usage:" + echo + echo " bash $0 [options]" + echo + echo "Options:" + echo ' -c, --config "" Specify config file(s)' + echo " -h, --help Print this information." +} + +read_baseurl() { + if [[ $_config == *","* ]]; then + # multiple config + IFS="," + read -ra config_array <<<"$_config" + + # reverse loop the config files + for ((i = ${#config_array[@]} - 1; i >= 0; i--)); do + _tmp_baseurl="$(grep '^baseurl:' "${config_array[i]}" | sed "s/.*: *//;s/['\"]//g;s/#.*//")" + + if [[ -n $_tmp_baseurl ]]; then + _baseurl="$_tmp_baseurl" + break + fi + done + + else + # single config + _baseurl="$(grep '^baseurl:' "$_config" | sed "s/.*: *//;s/['\"]//g;s/#.*//")" + fi +} + +main() { + # clean up + if [[ -d $SITE_DIR ]]; then + rm -rf "$SITE_DIR" + fi + + read_baseurl + + # build + JEKYLL_ENV=production bundle exec jekyll b \ + -d "$SITE_DIR$_baseurl" -c "$_config" + + # test + bundle exec htmlproofer "$SITE_DIR" \ + --disable-external \ + --ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/" +} + +while (($#)); do + opt="$1" + case $opt in + -c | --config) + _config="$2" + shift + shift + ;; + -h | --help) + help + exit 0 + ;; + *) + # unknown option + help + exit 1 + ;; + esac +done + +main