Skip to content

Fix div nesting bug in open-source program-support block - #46

Merged
corsonknowles merged 1 commit into
mainfrom
fix/open-source-program-support-nesting
Sep 1, 2026
Merged

Fix div nesting bug in open-source program-support block#46
corsonknowles merged 1 commit into
mainfrom
fix/open-source-program-support-nesting

Conversation

@bigtiger

Copy link
Copy Markdown
Contributor

Summary

  • On /open-source/, the Program Support section's container </div> closed inside the {{#foreach}} loop instead of after it, producing malformed unclosed-div HTML for every matched page beyond the first.
  • Moves the closing </div> to after {{/foreach}}{{/get}} so the container wraps the full loop output once, regardless of how many pages match the hash-oss-program-support tag.

Context

Found while investigating broken layout/styles on https://rubycentral.org/open-source/. That page currently has two other problems, tracked separately (not code fixes, so out of scope here):

  • The production app.css deployed to Ghost is stale/mismatched vs. main (missing #modern, .mission-and-vision, .program-support, .sponsors__inner, etc.) — needs a redeploy via the deploy-theme.yml pipeline.
  • Ghost currently holds duplicate Page records for several tags (e.g. 4x "Bundler", 4x "Program Support") — needs cleanup in Ghost Admin.

This PR only fixes the template bug, which independently corrupts the DOM once the duplicate-page issue above is present (and is worth fixing regardless).

Test plan

  • Rebuild theme locally (npm run build) and confirm #modern .program-support renders as a single well-formed <div class="container program-support">...</div> block with no stray closing tags, both when 1 page matches the tag and when multiple do.

The container's closing </div> was inside the {{#foreach}} loop
instead of after it, so any tag match beyond the first page emitted
malformed unclosed-div HTML for the Program Support section.
@corsonknowles
corsonknowles merged commit 0d4df83 into main Sep 1, 2026
1 check passed
@corsonknowles
corsonknowles deleted the fix/open-source-program-support-nesting branch September 1, 2026 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants