upgrade from 7.0.1 to 7.2.2
This commit is contained in:
parent
c3d25b78e4
commit
f721c98e33
5
.gitignore
vendored
5
.gitignore
vendored
@ -17,10 +17,11 @@ package-lock.json
|
||||
|
||||
# IDE configurations
|
||||
.idea
|
||||
.vscode
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/extensions.json
|
||||
!.vscode/tasks.json
|
||||
|
||||
# Misc
|
||||
_sass/dist
|
||||
_sass/vendors
|
||||
assets/js/dist
|
||||
|
||||
26
.vscode/tasks.json
vendored
Normal file
26
.vscode/tasks.json
vendored
Normal file
@ -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."
|
||||
}
|
||||
]
|
||||
}
|
||||
6
Gemfile
6
Gemfile
@ -2,10 +2,10 @@
|
||||
|
||||
source "https://rubygems.org"
|
||||
|
||||
gem "jekyll-theme-chirpy", "~> 7.0", ">= 7.0.1"
|
||||
gem "jekyll-theme-chirpy", "~> 7.2", ">= 7.2.2"
|
||||
|
||||
group :test do
|
||||
gem "html-proofer", "~> 5.0"
|
||||
gem "html-proofer", "~> 5.0", group: :test
|
||||
end
|
||||
|
||||
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
|
||||
@ -16,7 +16,7 @@ platforms :mingw, :x64_mingw, :mswin, :jruby do
|
||||
end
|
||||
|
||||
# Performance-booster for watching directories on Windows
|
||||
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
|
||||
gem "wdm", "~> 0.2.0", :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.
|
||||
|
||||
24
README.md
24
README.md
@ -25,30 +25,13 @@ Jekyll site. The following is a list of targets:
|
||||
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).
|
||||
Check out the [theme's docs](https://github.com/cotes2020/jekyll-theme-chirpy/wiki).
|
||||
|
||||
## Contributing
|
||||
|
||||
The contents of this repository are automatically updated when new releases are made to the [main repository][chirpy].
|
||||
If you have problems using it, or would like to participate in improving it, please go to the main repository for feedback!
|
||||
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
|
||||
|
||||
@ -56,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
|
||||
[mit]: https://github.com/cotes2020/chirpy-starter/blob/master/LICENSE
|
||||
@ -219,8 +219,9 @@ exclude:
|
||||
- tools
|
||||
- README.md
|
||||
- LICENSE
|
||||
- "*.config.js"
|
||||
- package*.json
|
||||
- purgecss.js
|
||||
- rollup.config.js
|
||||
- "package*.json"
|
||||
- db_scripts
|
||||
- frontmatter.json
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -35,4 +35,16 @@ platforms:
|
||||
# - label: fosstodon.org
|
||||
# link: "https://fosstodon.org/"
|
||||
# - label: photog.social
|
||||
# link: "https://photog.social/"
|
||||
# link: "https://photog.social/"
|
||||
#
|
||||
# - 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"
|
||||
@ -4,7 +4,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#f7f7f7">
|
||||
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#1b1b1e">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, user-scalable=no initial-scale=1, shrink-to-fit=no, viewport-fit=cover">
|
||||
@ -70,7 +70,7 @@
|
||||
|
||||
<!-- Bootstrap -->
|
||||
{% unless jekyll.environment == 'production' %}
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css">
|
||||
{% endunless %}
|
||||
|
||||
<!-- Theme style -->
|
||||
@ -97,7 +97,7 @@
|
||||
<link rel="stylesheet" href="{{ site.data.origin[type].glightbox.css | relative_url }}">
|
||||
{% endif %}
|
||||
|
||||
<!-- JavaScript -->
|
||||
<!-- Scripts -->
|
||||
<script>
|
||||
var serviceUrl = "{{site.custom-config.blog-services.service_url}}";
|
||||
var serviceApiKey = "{{site.custom-config.blog-services.service_key}}";
|
||||
@ -169,9 +169,28 @@
|
||||
<!-- End Microsoft Clarity -->
|
||||
{% endif %}
|
||||
|
||||
{% unless site.theme_mode %}
|
||||
{% include mode-toggle.html %}
|
||||
{% endunless %}
|
||||
<script src="{{ '/assets/js/dist/theme.min.js' | relative_url }}"></script>
|
||||
|
||||
{% include js-selector.html lang=lang %}
|
||||
|
||||
{% if jekyll.environment == 'production' %}
|
||||
<!-- PWA -->
|
||||
{% if site.pwa.enabled %}
|
||||
<script
|
||||
defer
|
||||
src="{{ '/app.min.js' | relative_url }}?baseurl={{ site.baseurl | default: '' }}®ister={{ site.pwa.cache.enabled }}"
|
||||
></script>
|
||||
{% endif %}
|
||||
|
||||
<!-- Web Analytics -->
|
||||
{% for analytics in site.analytics %}
|
||||
{% capture str %}{{ analytics }}{% endcapture %}
|
||||
{% assign platform = str | split: '{' | first %}
|
||||
{% if site.analytics[platform].id and site.analytics[platform].id != empty %}
|
||||
{% include analytics/{{ platform }}.html %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% include metadata-hook.html %}
|
||||
</head>
|
||||
@ -40,7 +40,7 @@ layout: compress
|
||||
</main>
|
||||
|
||||
<!-- panel -->
|
||||
<aside aria-label="Panel" id="panel-wrapper" class="col-xl-3 ps-2 mb-5 text-muted">
|
||||
<aside aria-label="Panel" id="panel-wrapper" class="col-xl-3 ps-2 text-muted">
|
||||
<div class="access">
|
||||
{% include_cached update-list.html lang=lang %}
|
||||
{% include_cached trending-tags.html lang=lang %}
|
||||
@ -75,14 +75,18 @@ layout: compress
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
<div id="mask"></div>
|
||||
<div id="mask" class="d-none position-fixed w-100 h-100 z-1"></div>
|
||||
|
||||
{% if site.pwa.enabled %}
|
||||
{% include_cached notification.html lang=lang %}
|
||||
{% endif %}
|
||||
|
||||
<!-- JavaScripts -->
|
||||
{% include js-selector.html lang=lang %}
|
||||
<!-- Embedded scripts -->
|
||||
|
||||
{% for _include in layout.script_includes %}
|
||||
{% assign _include_path = _include | append: '.html' %}
|
||||
{% include {{ _include_path }} %}
|
||||
{% endfor %}
|
||||
|
||||
{% include_cached search-loader.html lang=lang %}
|
||||
</body>
|
||||
|
||||
@ -6,12 +6,15 @@ panel_includes:
|
||||
tail_includes:
|
||||
- related-posts
|
||||
- post-nav
|
||||
- comments
|
||||
script_includes:
|
||||
- comment
|
||||
---
|
||||
|
||||
{% include lang.html %}
|
||||
|
||||
<article class="px-1">
|
||||
{% include toc-status.html %}
|
||||
|
||||
<article class="px-1" data-toc="{{ enable_toc }}">
|
||||
<header>
|
||||
<h1 data-toc-skip>{{ page.title }}</h1>
|
||||
{% if page.description %}
|
||||
@ -108,6 +111,30 @@ tail_includes:
|
||||
{% include post-series.html %}
|
||||
</header>
|
||||
|
||||
{% if enable_toc %}
|
||||
<div id="toc-bar" class="d-flex align-items-center justify-content-between invisible">
|
||||
<span class="label text-truncate">{{ page.title }}</span>
|
||||
<button type="button" class="toc-trigger btn me-1">
|
||||
<i class="fa-solid fa-list-ul fa-fw"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<button id="toc-solo-trigger" type="button" class="toc-trigger btn btn-outline-secondary btn-sm">
|
||||
<span class="label ps-2 pe-1">{{- site.data.locales[lang].panel.toc -}}</span>
|
||||
<i class="fa-solid fa-angle-right fa-fw"></i>
|
||||
</button>
|
||||
|
||||
<dialog id="toc-popup" class="p-0">
|
||||
<div class="header d-flex flex-row align-items-center justify-content-between">
|
||||
<div class="label text-truncate py-2 ms-4">{{- page.title -}}</div>
|
||||
<button id="toc-popup-close" type="button" class="btn mx-1 my-1 opacity-75">
|
||||
<i class="fas fa-close"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div id="toc-popup-content" class="px-4 py-3 pb-4"></div>
|
||||
</dialog>
|
||||
{% endif %}
|
||||
|
||||
<div class="content">
|
||||
{{ content }}
|
||||
{% if page.disable-ty != true %}
|
||||
|
||||
54
tools/run.sh
Normal file
54
tools/run.sh
Normal file
@ -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"
|
||||
89
tools/test.sh
Normal file
89
tools/test.sh
Normal file
@ -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 "<config_a[,config_b[...]]>" 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
|
||||
Loading…
Reference in New Issue
Block a user