Skip to content

Commit 74bf1f7

Browse files
committed
update changelog generator
1 parent 0bed39d commit 74bf1f7

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed
Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
11
class Builders::ChangelogGenerator < SiteBuilder
22
def build
3-
# changelog_file = File.expand_path("../../../CHANGELOG.md", __dir__)
4-
# add_resource :documentation, "references/00-changelog.md" do
5-
# title "Changelog"
6-
# permalink "/references/changelog"
7-
# category "references"
8-
# content File.read(changelog_file)
9-
# end
3+
hook :site, :post_read do
4+
generate_changelog
5+
end
6+
7+
hook :site, :post_reload do
8+
generate_changelog
9+
end
10+
end
11+
12+
def generate_changelog
13+
changelog_file = File.expand_path("../../../CHANGELOG.md", __dir__)
14+
add_resource :documentation, "references/00-changelog.md" do
15+
title "Changelog"
16+
permalink "/references/changelog/"
17+
category "references"
18+
layout "doc"
19+
content File.read(changelog_file)
20+
end
1021
end
1122
end
23+
24+

0 commit comments

Comments
 (0)