Skip to content

Commit

Permalink
update changelog generator
Browse files Browse the repository at this point in the history
  • Loading branch information
KonnorRogers committed Feb 12, 2024
1 parent 0bed39d commit 74bf1f7
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions docs/plugins/builders/changelog_generator.rb
Original file line number Diff line number Diff line change
@@ -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


0 comments on commit 74bf1f7

Please sign in to comment.