Skip to content

Commit

Permalink
Add CHANGELOG as vendored file (#1239)
Browse files Browse the repository at this point in the history
- Searchable
- Using two_column_layout

See #1233
  • Loading branch information
olleolleolle authored Oct 28, 2023
1 parent 9cbd24f commit a6df431
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
activate :syntax
activate :i18n
activate :search do |search|
search.resources = ["index.html", "guides/", "#{config[:current_version]}/", "compatibility.html", "conduct.html", "contributors.html"]
search.resources = ["index.html", "guides/", "#{config[:current_version]}/", "changelog.html", "compatibility.html", "conduct.html", "contributors.html"]

search.index_path = "search/lunr-index.json"

Expand Down Expand Up @@ -187,6 +187,7 @@

redirect "sponsors.html", to: "https://rubygems.org/pages/sponsors" # Backwards compatibility

page "/changelog.html", layout: :two_column_layout
page "/conduct.html", layout: :two_column_layout
page "/compatibility.html", layout: :two_column_layout
page /\/v(\d+.\d+)\/(?!bundle_|commands|docs|man)(.*)/, layout: :two_column_layout
Expand Down
3 changes: 3 additions & 0 deletions lib/tasks/vendor_files.rake
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ RELATIVE_LINK_REGEX = %r{
def new_link(file, link)
if link.end_with?("CODE_OF_CONDUCT.md")
"conduct" # Special case we manually write
elsif link.end_with?("CHANGELOG.md")
"changelog" # Special case we manually write
elsif link.start_with?("mailto:") || link.start_with?("http")
link
else
Expand Down Expand Up @@ -65,5 +67,6 @@ task repo_pages: :update_vendor do
end

write_file("../CODE_OF_CONDUCT.md", File.expand_path("./conduct.html.md", source_dir))
write_file("../CHANGELOG.md", File.expand_path("./changelog.html.md", source_dir))
end
end

0 comments on commit a6df431

Please sign in to comment.