feat: Add blog posts section#46
Conversation
- Add blog posts index page with chronological listing - Add blog posts to site navigation in mkdocs.yml - Add 'Latest Blog Posts' section to the home page - Include existing blog posts: - Enforcing Conventional Commits with GitHub Actions - Enforcing Conventional Commits with Git Hooks - Continuous Delivery for Ruby Gems - Testing Ruby code that calls abort and exit - Defining Class Variables and Constants in Anonymous Classes
There was a problem hiding this comment.
Pull request overview
Adds a dedicated Blog Posts area to the MkDocs site, including a posts index and site navigation/homepage entry points for recent posts.
Changes:
- Add a
Blog Postsnavigation section inmkdocs.yml - Add a
Latest Blog Postssection to the homepage and a newdocs/blog_posts.mdindex page - Add new blog post documents under
docs/blog_posts/
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| mkdocs.yml | Adds a new “Blog Posts” section to site navigation. |
| docs/index.md | Adds “Latest Blog Posts” links to the homepage. |
| docs/blog_posts.md | New blog post index page listing posts chronologically. |
| docs/blog_posts/2025-04-20-enforcing-conventional-commits-github.md | New (WIP) post stub. |
| docs/blog_posts/2025-04-18-enforcing-conventional-commits-git.md | New (WIP) post stub with basic outline/TOC. |
| docs/blog_posts/2025-04-16-continuous-delivery-for-ruby-gems.md | New full post including an implementation runbook and workflow examples. |
| docs/blog_posts/2024-03-11-testing-ruby-exit-abort.adoc | New post file (currently .adoc). |
| docs/blog_posts/2022-03-21-defining-class-variables-and-constants-in-an-anonymous-class.md | New post content with Ruby examples. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - Blog Posts: | ||
| - blog_posts.md | ||
| - Defining Class Variables and Constants in an Anonymous Class: blog_posts/2022-03-21-defining-class-variables-and-constants-in-an-anonymous-class.md | ||
| - Continuous Delivery for Ruby Gems: blog_posts/2025-04-16-continuous-delivery-for-ruby-gems.md | ||
| - Enforcing Conventional Commits with Git Hooks: blog_posts/2025-04-18-enforcing-conventional-commits-git.md | ||
| - Enforcing Conventional Commits with GitHub Actions: blog_posts/2025-04-20-enforcing-conventional-commits-github.md |
There was a problem hiding this comment.
The new Blog Posts nav section omits the 2024-03-11 post that’s linked from both docs/index.md and docs/blog_posts.md. With strict: true, this kind of inconsistency can easily lead to broken/unclear navigation; consider adding the missing post here (or removing the links if it’s intentionally not published).
|
|
||
| ### Latest Blog Posts | ||
|
|
||
| * 2025-04-21: [Enforcing Conventional Commits with GitHub Actions](blog_posts/2025-04-20-enforcing-conventional-commits-github.md) |
There was a problem hiding this comment.
The displayed date (2025-04-21) doesn’t match the linked post filename/date (2025-04-20-enforcing-conventional-commits-github.md). This will confuse readers and makes the chronological ordering ambiguous; align the date and the linked file.
| * 2025-04-21: [Enforcing Conventional Commits with GitHub Actions](blog_posts/2025-04-20-enforcing-conventional-commits-github.md) | |
| * 2025-04-20: [Enforcing Conventional Commits with GitHub Actions](blog_posts/2025-04-20-enforcing-conventional-commits-github.md) |
| * 2025-04-21: [Enforcing Conventional Commits with GitHub Actions](blog_posts/2025-04-20-enforcing-conventional-commits-github.md) | ||
| * 2025-04-18: [Enforcing Conventional Commits with Git Hooks](blog_posts/2025-04-18-enforcing-conventional-commits-git.md) | ||
| * 2025-04-16: [Continuous Delivery for Ruby gems](blog_posts/2025-04-16-continuous-delivery-for-ruby-gems.md) | ||
| * 2024-03-11: [Testing Ruby code that calls `abort` and `exit`](blog_posts/2024-03-11-testing-ruby-exit-abort.adoc) |
There was a problem hiding this comment.
Linking directly to a .adoc file is likely to render incorrectly in MkDocs (this repo’s mkdocs.yml doesn’t configure an AsciiDoc plugin). Either convert/rename the post to .md and update links, or add/configure an AsciiDoc plugin and include the page in nav so it’s rendered as a proper page.
| * 2024-03-11: [Testing Ruby code that calls `abort` and `exit`](blog_posts/2024-03-11-testing-ruby-exit-abort.adoc) | |
| * 2024-03-11: [Testing Ruby code that calls `abort` and `exit`](blog_posts/2024-03-11-testing-ruby-exit-abort.md) |
| Using `self` in the method invokation `self.class_variable_set` is redundant. | ||
| I included it in this example to make the point that `class_eval` DOES set | ||
| `self` as expected and that the solution to defining a class variable for | ||
| the anonymous classs is to explicitly call `class_variable_set` in the anonymous |
There was a problem hiding this comment.
Typo: “classs” should be “class”.
| the anonymous classs is to explicitly call `class_variable_set` in the anonymous | |
| the anonymous class is to explicitly call `class_variable_set` in the anonymous |
| # Testing Ruby code that calls `abort` and `exit` | ||
| James Couball | ||
| :toc: | ||
|
|
||
| Testing code that uses the `abort` or `exit` is a challenge for many developers. |
There was a problem hiding this comment.
This file is named .adoc, but its content is written in Markdown (e.g., # headings and fenced code blocks). Given MkDocs isn’t configured for AsciiDoc here, this post likely won’t render as intended; consider renaming to .md (and/or converting to real AsciiDoc if that’s the goal).
| * 2025-04-21: [Enforcing Conventional Commits with GitHub Actions](blog_posts/2025-04-20-enforcing-conventional-commits-github.md) | ||
| * 2025-04-18: [Enforcing Conventional Commits with Git Hooks](blog_posts/2025-04-18-enforcing-conventional-commits-git.md) | ||
| * 2025-04-16: [Continuous Delivery for Ruby gems](blog_posts/2025-04-16-continuous-delivery-for-ruby-gems.md) | ||
| * 2024-03-11: [Testing Ruby code that calls `abort` and `exit`](blog_posts/2024-03-11-testing-ruby-exit-abort.adoc) |
There was a problem hiding this comment.
This index links to a .adoc blog post, but MkDocs in this repo isn’t configured to render AsciiDoc. As a result, the page will likely be served as a static file instead of a rendered doc page; consider renaming/converting it to .md (or adding an AsciiDoc plugin and nav entry).
| * 2024-03-11: [Testing Ruby code that calls `abort` and `exit`](blog_posts/2024-03-11-testing-ruby-exit-abort.adoc) | |
| * 2024-03-11: [Testing Ruby code that calls `abort` and `exit`](blog_posts/2024-03-11-testing-ruby-exit-abort.md) |
| name: RubyGems | ||
| url: https://rubygems.org/gems/<gem-name> | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| id-token: write | ||
|
|
||
| steps: | ||
| - name: Checkout project | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Create release | ||
| uses: googleapis/release-please-action@v4 | ||
| id: release | ||
| with: | ||
| token: ${{ secrets.AUTO_RELEASE_TOKEN }} | ||
| config-file: release-please-config.json | ||
| manifest-file: .release-please-manifest.json | ||
|
|
||
| - name: Setup ruby | ||
| uses: ruby/setup-ruby@v1 | ||
| if: ${{ steps.release.outputs.release_created }} | ||
| with: | ||
| bundler-cache: true | ||
| ruby-version: ruby | ||
|
|
||
| - name: Push to RubyGems.org | ||
| uses: rubygems/release-gem@v1 | ||
| if: ${{ steps.release.outputs.release_created }} |
There was a problem hiding this comment.
The GitHub Actions workflow YAML shown here is not valid due to indentation errors (e.g., environment, permissions, and steps children aren’t nested). Since this is a runbook readers may copy/paste, it should be corrected to a valid workflow structure.
| name: RubyGems | |
| url: https://rubygems.org/gems/<gem-name> | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| id-token: write | |
| steps: | |
| - name: Checkout project | |
| uses: actions/checkout@v4 | |
| - name: Create release | |
| uses: googleapis/release-please-action@v4 | |
| id: release | |
| with: | |
| token: ${{ secrets.AUTO_RELEASE_TOKEN }} | |
| config-file: release-please-config.json | |
| manifest-file: .release-please-manifest.json | |
| - name: Setup ruby | |
| uses: ruby/setup-ruby@v1 | |
| if: ${{ steps.release.outputs.release_created }} | |
| with: | |
| bundler-cache: true | |
| ruby-version: ruby | |
| - name: Push to RubyGems.org | |
| uses: rubygems/release-gem@v1 | |
| if: ${{ steps.release.outputs.release_created }} | |
| name: RubyGems | |
| url: https://rubygems.org/gems/<gem-name> | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| id-token: write | |
| steps: | |
| - name: Checkout project | |
| uses: actions/checkout@v4 | |
| - name: Create release | |
| uses: googleapis/release-please-action@v4 | |
| id: release | |
| with: | |
| token: ${{ secrets.AUTO_RELEASE_TOKEN }} | |
| config-file: release-please-config.json | |
| manifest-file: .release-please-manifest.json | |
| - name: Setup ruby | |
| uses: ruby/setup-ruby@v1 | |
| if: ${{ steps.release.outputs.release_created }} | |
| with: | |
| bundler-cache: true | |
| ruby-version: ruby | |
| - name: Push to RubyGems.org | |
| uses: rubygems/release-gem@v1 | |
| if: ${{ steps.release.outputs.release_created }} |
| # Make it so that calling `rake release` just calls `rake release:rubygems_push` to | ||
| # avoid creating and pushing a new tag. | ||
|
|
||
| Rake::Task['release'].clear | ||
| desc 'Customized release task to avoid creating a new tag' | ||
| task release: 'release:rubygem_push' |
There was a problem hiding this comment.
Within this example, the comment says release:rubygems_push but the task invoked is release:rubygem_push (no “s”). Align these so the runbook doesn’t send readers to a non-existent rake task.
| ```Ruby | ||
| class MyClass | ||
| @@class_var = :foo |
There was a problem hiding this comment.
Code fences use ```Ruby here, but elsewhere in the docs the repo consistently uses lower-case language identifiers (e.g., ```ruby in docs/ruby/subprocesses.md). Using ruby improves consistency and syntax highlighting reliability.
| end | ||
| ``` | ||
|
|
||
| Using `self` in the method invokation `self.class_variable_set` is redundant. |
There was a problem hiding this comment.
Typo: “invokation” should be “invocation”.
| Using `self` in the method invokation `self.class_variable_set` is redundant. | |
| Using `self` in the method invocation `self.class_variable_set` is redundant. |
Summary
Add a dedicated Blog Posts section to the site with an index page and navigation.
Changes
docs/blog_posts.md— New blog posts index page with a chronological listing of all postsdocs/blog_posts/— Add 5 blog post files to the new directory:abortandexitdocs/index.md— Add "Latest Blog Posts" section to the home pagemkdocs.yml— Add Blog Posts navigation section