Skip to content

Commit

Permalink
Add Rakefile for automatically syncing CHANGELOG with history
Browse files Browse the repository at this point in the history
  • Loading branch information
iBug committed Apr 22, 2024
1 parent b604e2a commit aae8dac
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 9 deletions.
27 changes: 27 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
require "bundler/gem_tasks"
require "jekyll"
require "listen"
require "time"
require "yaml"

def listen_ignore_paths(base, options)
[
Expand Down Expand Up @@ -74,3 +76,28 @@ task :preview do

Jekyll::Commands::Serve.process(options)
end

file "docs/_docs/18-history.md" => "CHANGELOG.md" do |t|
front_matter = {
title: "History",
classes: "wide",
permalink: "/docs/history/",
excerpt: "Change log of enhancements and bug fixes made to the theme.",
sidebar: {
nav: "docs",
},
last_modified_at: Time.now.iso8601,
toc: false,
}
# https://stackoverflow.com/a/49553523/5958455
front_matter = JSON.parse(JSON.dump(front_matter))
File.open(t.name, "w") do |f|
f.puts front_matter.to_yaml
f.puts "---"
f.puts ""
f.puts "<!-- Sourced from CHANGELOG.md -->"
f.puts "{% raw %}"
f.write File.read(t.prerequisites.first)
f.puts "{% endraw %}"
end
end
21 changes: 12 additions & 9 deletions docs/_docs/18-history.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
---
title: "History"
title: History
classes: wide
permalink: /docs/history/
excerpt: "Change log of enhancements and bug fixes made to the theme."
permalink: "/docs/history/"
excerpt: Change log of enhancements and bug fixes made to the theme.
sidebar:
nav: docs
last_modified_at: 2024-04-22T23:58:35+08:00
last_modified_at: '2024-04-23T00:24:15+08:00'
toc: false
---

<!-- Sourced from CHANGELOG.md -->
{% raw %}
## Unreleased

### Bug Fixes
Expand Down Expand Up @@ -537,7 +539,7 @@ toc: false
- Style archive links with appropriate link color.
- Adjust feature row spacing and font-sizes.
- Use sentence case and increase font-sizes for improved readability in table of contents.
- Add {% raw %}`{{ content }}`{% endraw %} to `home` layout. [#1775](https://github.com/mmistakes/minimal-mistakes/pull/1775)
- Add `{{ content }}` to `home` layout. [#1775](https://github.com/mmistakes/minimal-mistakes/pull/1775)

## [4.12.1](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.12.1)

Expand Down Expand Up @@ -782,7 +784,7 @@ toc: false
- Reduce amount of blank pages when printing in Chrome. [#1196](https://github.com/mmistakes/minimal-mistakes/issues/1196)
- Remove `#disqus_thread` duplicate from `comments-providers/disqus.html` as it is already in `comments.html` include. [#1199](https://github.com/mmistakes/minimal-mistakes/issues/1199)
- Fix Liquid syntax errors in `tag-list.html` and `category-list.html` includes by removing parenthesis in `assign`s. [#1223](https://github.com/mmistakes/minimal-mistakes/issues/1223)
- Fix Liquid syntax error: "Expected id but found open_square in {% raw %}`"{{ page.[include.id] }}"`"{% endraw %} in `gallery` and `feature_row` includes.
- Fix Liquid syntax error: "Expected id but found open_square in `"{{ page.[include.id] }}"`" in `gallery` and `feature_row` includes.
- Fix Liquid syntax error: "Expected end_of_string but found pipe in `"name in __names | sort"`" in `group-by-array` include.

## [4.5.1](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.5.1)
Expand Down Expand Up @@ -1110,18 +1112,18 @@ toc: false

### Enhancements

- Improve line numbered code block styling when using `{% raw %}{% highlight linenos %}{% endraw %}` tag. [#513](https://github.com/mmistakes/minimal-mistakes/issues/513)
- Improve line numbered code block styling when using `{% highlight linenos %}` tag. [#513](https://github.com/mmistakes/minimal-mistakes/issues/513)
- Add English fallback to "Follow" button label. [#496](https://github.com/mmistakes/minimal-mistakes/pull/496)

### Bug Fixes

- Fix Firefox alignment issues with code blocks generated with the `{% raw %}{% highlight %}{% endraw %}` tag. [#512](https://github.com/mmistakes/minimal-mistakes/issues/512)
- Fix Firefox alignment issues with code blocks generated with the `{% highlight %}` tag. [#512](https://github.com/mmistakes/minimal-mistakes/issues/512)

### Maintenance

- Clarified comment for `author.stackoverflow` value used in author sidebar links. [#487](https://github.com/mmistakes/minimal-mistakes/pull/487)
- Add list of localized text strings. [#488](https://github.com/mmistakes/minimal-mistakes/pull/488)
- Add `{% raw %}{% highlight %}{% endraw %}` code block examples to demo site.
- Add `{% highlight %}` code block examples to demo site.
- Add documentation for using custom sidebar navigation menus. [#476](https://github.com/mmistakes/minimal-mistakes/issues/476)

## [3.4.4](https://github.com/mmistakes/minimal-mistakes/releases/tag/3.4.4)
Expand Down Expand Up @@ -1641,3 +1643,4 @@ toc: false
- Google Analytics, Google Authorship, webmaster verifies, and Twitter card meta are now optional.

## [1.0.1](https://github.com/mmistakes/minimal-mistakes/releases/tag/v1.0.1)
{% endraw %}

0 comments on commit aae8dac

Please sign in to comment.