Skip to content

Commit

Permalink
refactor: simplify meta info
Browse files Browse the repository at this point in the history
  • Loading branch information
cotes2020 committed Sep 10, 2023
1 parent ec69bea commit 806fa3a
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 36 deletions.
2 changes: 1 addition & 1 deletion _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<!-- Font Awesome -->
<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 %}
<link rel="stylesheet" href="{{ site.data.origin[type].toc.css | relative_url }}">
Expand Down
4 changes: 1 addition & 3 deletions _javascript/_copyright
Original file line number Diff line number Diff line change
@@ -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 %>
6 changes: 0 additions & 6 deletions _sass/jekyll-theme-chirpy.scss → _sass/main.scss
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
---

@import '{{ site.theme }}';
@import 'main';

/* append your custom style below */
27 changes: 2 additions & 25 deletions tools/release
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ JS_DIST="assets/js/dist"
BACKUP_PATH="$(mktemp -d)"

FILES=(
"_sass/jekyll-theme-chirpy.scss"
"$GEM_SPEC"
"$NODE_CONFIG"
)
Expand Down Expand Up @@ -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 .
Expand Down

0 comments on commit 806fa3a

Please sign in to comment.