From 806fa3aa1a7444186e1db4fe693886450e351997 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Sun, 10 Sep 2023 15:25:15 +0800 Subject: [PATCH] refactor: simplify meta info --- _includes/head.html | 2 +- _javascript/_copyright | 4 +-- _sass/{jekyll-theme-chirpy.scss => main.scss} | 6 ----- .../{style.scss => jekyll-theme-chirpy.scss} | 2 +- tools/release | 27 ++----------------- 5 files changed, 5 insertions(+), 36 deletions(-) rename _sass/{jekyll-theme-chirpy.scss => main.scss} (75%) rename assets/css/{style.scss => jekyll-theme-chirpy.scss} (62%) diff --git a/_includes/head.html b/_includes/head.html index e4bfcb6..408358f 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -74,7 +74,7 @@ - + {% if site.toc and page.toc %} diff --git a/_javascript/_copyright b/_javascript/_copyright index dedc8ed..60a706b 100644 --- a/_javascript/_copyright +++ b/_javascript/_copyright @@ -1,3 +1 @@ -Chirpy v<%= pkg.version %> (<%= pkg.homepage %>) -© 2019 <%= pkg.author %> -<%= pkg.license %> Licensed +Chirpy v<%= pkg.version %> | © 2019 <%= pkg.author %> | <%= pkg.license %> Licensed | <%= pkg.homepage %> diff --git a/_sass/jekyll-theme-chirpy.scss b/_sass/main.scss similarity index 75% rename from _sass/jekyll-theme-chirpy.scss rename to _sass/main.scss index 13e97e8..1c2311d 100644 --- a/_sass/jekyll-theme-chirpy.scss +++ b/_sass/main.scss @@ -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-dark'; @import 'addon/variables'; diff --git a/assets/css/style.scss b/assets/css/jekyll-theme-chirpy.scss similarity index 62% rename from assets/css/style.scss rename to assets/css/jekyll-theme-chirpy.scss index a8805f4..1280b9e 100644 --- a/assets/css/style.scss +++ b/assets/css/jekyll-theme-chirpy.scss @@ -1,6 +1,6 @@ --- --- -@import '{{ site.theme }}'; +@import 'main'; /* append your custom style below */ diff --git a/tools/release b/tools/release index 4ac1322..746ab96 100755 --- a/tools/release +++ b/tools/release @@ -31,7 +31,6 @@ JS_DIST="assets/js/dist" BACKUP_PATH="$(mktemp -d)" FILES=( - "_sass/jekyll-theme-chirpy.scss" "$GEM_SPEC" "$NODE_CONFIG" ) @@ -104,31 +103,9 @@ check() { _check_node_packages } -_bump_files() { - 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 latest version number and create a commit to save the changes bump() { - _bump_files "$1" - _bump_gemspec "$1" + sed -i "s/[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+/$1/" "$GEM_SPEC" if [[ $opt_pre = false && -n $(git status . -s) ]]; then git add .