diff --git a/docs/plugins/builders/changelog_generator.rb b/docs/plugins/builders/changelog_generator.rb index e1a219c5..3c7de3f9 100644 --- a/docs/plugins/builders/changelog_generator.rb +++ b/docs/plugins/builders/changelog_generator.rb @@ -1,11 +1,24 @@ class Builders::ChangelogGenerator < SiteBuilder def build - # changelog_file = File.expand_path("../../../CHANGELOG.md", __dir__) - # add_resource :documentation, "references/00-changelog.md" do - # title "Changelog" - # permalink "/references/changelog" - # category "references" - # content File.read(changelog_file) - # end + hook :site, :post_read do + generate_changelog + end + + hook :site, :post_reload do + generate_changelog + end + end + + def generate_changelog + changelog_file = File.expand_path("../../../CHANGELOG.md", __dir__) + add_resource :documentation, "references/00-changelog.md" do + title "Changelog" + permalink "/references/changelog/" + category "references" + layout "doc" + content File.read(changelog_file) + end end end + +