Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure all searchable pages have a frontmatter title #1433

Merged
merged 1 commit into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions lib/tasks/vendor_files.rake
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def new_link(file, link)
end
end

def write_file(file, to)
def write_file(file, to, title: nil)
content = File.read(file)

file = file.sub("doc/bundler/", "doc/").downcase
Expand All @@ -38,6 +38,7 @@ def write_file(file, to)
new_link = new_link(file, Regexp.last_match[:link].downcase)
"[#{Regexp.last_match[:title]}](#{new_link})"
end
content.prepend("---\ntitle: #{title}\n---\n\n") if title

FileUtils.mkpath(File.dirname(to))
File.write(to, content)
Expand Down Expand Up @@ -70,7 +71,7 @@ task repo_pages: :update_vendor do
write_file(file, to)
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))
write_file("CODE_OF_CONDUCT.md", File.expand_path("./conduct.html.md", source_dir), title: "RubyGems and Bundler Code of Conduct")
write_file("CHANGELOG.md", File.expand_path("./changelog.html.md", source_dir), title: "ChangeLog")
end
end
4 changes: 4 additions & 0 deletions source/conduct.html.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: RubyGems and Bundler Code of Conduct
---

# RubyGems and Bundler Code of Conduct

## Our Pledge
Expand Down
4 changes: 4 additions & 0 deletions source/guides/bundler_workflow.html.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Recommended Workflow with Version Control
---

## Recommended Workflow with Version Control

In general, when working with an application managed with bundler, you
Expand Down
4 changes: 4 additions & 0 deletions source/guides/gemfile.html.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Gemfiles
---

## In Depth

Read the manual for an in-depth discussion of all of the options available in the
Expand Down
4 changes: 4 additions & 0 deletions source/guides/gemfile_ruby.html.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Ruby Directive
---

## Specifying a Ruby Version

Like gems, developers can setup a dependency on Ruby.
Expand Down
4 changes: 4 additions & 0 deletions source/guides/rationale.html.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Why Bundler exists
---

If you just want to know our recommended workflow and don't care about the rationale, feel
free to [jump to the summary](#summary) below.

Expand Down
4 changes: 4 additions & 0 deletions source/guides/rubygems.html.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Bundler in gems
---

## Using Bundler while developing a gem

If you're creating a gem from scratch, you can use bundler's built in gem skeleton to create a base gem for you to edit.
Expand Down
4 changes: 4 additions & 0 deletions source/guides/rubymotion.html.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: How to use Bundler with RubyMotion
---

## How to use Bundler with RubyMotion

If you don't have a RubyMotion app yet, generate one.
Expand Down