refactor: simplify meta info

This commit is contained in:
Cotes Chung 2023-09-10 15:25:15 +08:00
parent ec69bea841
commit 806fa3aa1a
No known key found for this signature in database
GPG key ID: 0D9E54843167A808
5 changed files with 5 additions and 36 deletions

View file

@ -74,7 +74,7 @@
<!-- Font Awesome --> <!-- Font Awesome -->
<link rel="stylesheet" href="{{ site.data.origin[type].fontawesome.css | relative_url }}"> <link rel="stylesheet" href="{{ site.data.origin[type].fontawesome.css | relative_url }}">
<link rel="stylesheet" href="{{ '/assets/css/style.css' | relative_url }}"> <link rel="stylesheet" href="{{ '/assets/css/:THEME.css' | replace: ':THEME', site.theme | relative_url }}">
{% if site.toc and page.toc %} {% if site.toc and page.toc %}
<link rel="stylesheet" href="{{ site.data.origin[type].toc.css | relative_url }}"> <link rel="stylesheet" href="{{ site.data.origin[type].toc.css | relative_url }}">

View file

@ -1,3 +1 @@
Chirpy v<%= pkg.version %> (<%= pkg.homepage %>) Chirpy v<%= pkg.version %> | © 2019 <%= pkg.author %> | <%= pkg.license %> Licensed | <%= pkg.homepage %>
© 2019 <%= pkg.author %>
<%= pkg.license %> Licensed

View file

@ -1,9 +1,3 @@
/*!
* Chirpy v6.1.0 (https://github.com/cotes2020/jekyll-theme-chirpy)
* © 2019 Cotes Chung
* MIT Licensed
*/
@import 'colors/typography-light'; @import 'colors/typography-light';
@import 'colors/typography-dark'; @import 'colors/typography-dark';
@import 'addon/variables'; @import 'addon/variables';

View file

@ -1,6 +1,6 @@
--- ---
--- ---
@import '{{ site.theme }}'; @import 'main';
/* append your custom style below */ /* append your custom style below */

View file

@ -31,7 +31,6 @@ JS_DIST="assets/js/dist"
BACKUP_PATH="$(mktemp -d)" BACKUP_PATH="$(mktemp -d)"
FILES=( FILES=(
"_sass/jekyll-theme-chirpy.scss"
"$GEM_SPEC" "$GEM_SPEC"
"$NODE_CONFIG" "$NODE_CONFIG"
) )
@ -104,31 +103,9 @@ check() {
_check_node_packages _check_node_packages
} }
_bump_files() { ## Bump latest version number and create a commit to save the changes
for i in "${!FILES[@]}"; do
if [[ ${FILES[$i]} == "$NODE_CONFIG" ]]; then
continue
fi
sed -i "s/v[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+/v$1/" "${FILES[$i]}"
done
}
_bump_gemspec() {
sed -i "s/[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+/$1/" "$GEM_SPEC"
}
# 1. Bump latest version number to the following files:
#
# - _sass/jekyll-theme-chirpy.scss
# - _javascript/copyright
# - assets/js/dist/*.js (will be built by gulp later)
# - jekyll-theme-chirpy.gemspec
#
# 2. Create a commit to save the changes.
bump() { bump() {
_bump_files "$1" sed -i "s/[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+/$1/" "$GEM_SPEC"
_bump_gemspec "$1"
if [[ $opt_pre = false && -n $(git status . -s) ]]; then if [[ $opt_pre = false && -n $(git status . -s) ]]; then
git add . git add .