Add Rake task :version

For updating all hard-coded version numbers from `package.json`
This commit is contained in:
iBug
2024-05-05 05:52:08 +08:00
parent f33349c2ee
commit 7e7b901974
6 changed files with 38 additions and 13 deletions
-1
View File
@@ -6,7 +6,6 @@
# `jekyll serve`. If you change this file, please restart the server process.
remote_theme : "mmistakes/minimal-mistakes@master"
theme_version : "4.25.1" # for use with in-page templates
minimal_mistakes_skin : "default" # "air", "aqua", "contrast", "dark", "dirt", "neon", "mint", "plum", "sunrise"
+3
View File
@@ -0,0 +1,3 @@
# for use with in-page templates
---
version: 4.25.1
+1 -1
View File
@@ -78,7 +78,7 @@ To install as a remote theme:
bundle
```
4. Add `remote_theme: "mmistakes/minimal-mistakes@{{ site.theme_version }}"` to your `_config.yml` file. Remove any other `theme:` or `remote_theme:` entry.
4. Add `remote_theme: "mmistakes/minimal-mistakes@{{ site.data.theme.version }}"` to your `_config.yml` file. Remove any other `theme:` or `remote_theme:` entry.
You may also optionally specify a branch, [tag](https://github.com/mmistakes/minimal-mistakes/tags), or commit to use by appending an @ and the Git ref (e.g., `mmistakes/minimal-mistakes@4.9.0` or `mmistakes/minimal-mistakes@bbf3cbc5fd64a3e1885f3f99eb90ba92af84063d`). This is useful when rolling back to older versions of the theme. If you don't specify a Git ref, the latest on `master` will be used.
+2 -2
View File
@@ -23,7 +23,7 @@ Simply run `bundle update` if you're using Bundler (have a `Gemfile`) or `gem up
When using Bundler you can downgrade or lock the theme to a specific release ([tag][tag]), branch, or commit. Instead of `gem "minimal-mistakes-jekyll"` you'd add the following to your `Gemfile`:
```ruby
gem "minimal-mistakes-jekyll", :git => "https://github.com/mmistakes/minimal-mistakes.git", :tag => "{{ site.theme_version }}"
gem "minimal-mistakes-jekyll", :git => "https://github.com/mmistakes/minimal-mistakes.git", :tag => "{{ site.data.theme.version }}"
```
[tag]: https://github.com/mmistakes/minimal-mistakes/tags
@@ -32,7 +32,7 @@ For more information on [installing gems from Git repositories](https://bundler.
## Remote theme
When setting `remote_theme: "mmistakes/minimal-mistakes@{{ site.theme_version }}"` in your `_config.yml` you may also optionally specify a branch, [tag][tag], or commit to use by appending an @ and the Git ref.
When setting `remote_theme: "mmistakes/minimal-mistakes@{{ site.data.theme.version }}"` in your `_config.yml` you may also optionally specify a branch, [tag][tag], or commit to use by appending an @ and the Git ref.
For example, you can roll back to release 4.8.1 with `mmistakes/minimal-mistakes@4.8.1` or a specific commit with `mmistakes/minimal-mistakes@bbf3cbc5fd64a3e1885f3f99eb90ba92af84063d`). For a complete list of theme versions consult the [releases page](https://github.com/mmistakes/minimal-mistakes/releases).