Skip to content

Add script-driven CI and fix upstream CSS/OG regressions#68

Merged
GrantBirki merged 4 commits intomainfrom
codex/ci-and-upstream-hardening
Feb 24, 2026
Merged

Add script-driven CI and fix upstream CSS/OG regressions#68
GrantBirki merged 4 commits intomainfrom
codex/ci-and-upstream-hardening

Conversation

@GrantBirki
Copy link
Owner

@GrantBirki GrantBirki commented Feb 24, 2026

🧱 Hugo CI + Theme Hardening

About

This pull request makes CI reproducible for this Hugo theme and fixes template behavior that was not aligned with Hugo best practices. It also hardens rendering for subpath deployments and improves output correctness for social metadata and heading anchors.

Reason

The branch had failing checks on macOS/Linux due to environment assumptions (rg availability, repo-root Hugo source usage, and fragile exact Hugo version string matching), and there were template URL patterns that could produce invalid Open Graph output under non-root baseURL setups.

  • Pin Hugo to 0.156.0 via .github/.hugo-version.
  • Vendor Hugo installers under .github/vendor/bin/ and install those in CI only.
  • Build/lint/test against a generated fixture site instead of repository root so theme CI does not depend on a local Hugo config.
  • Replace brittle meta URL concatenation and regex heading rewriting with Hugo-native patterns.

Details

Added and integrated script-driven CI hardening across script/bootstrap, script/build, script/lint, and script/test, including a shared fixture generator at script/lib/hugo-fixture.sh, portable grep/find checks, and expanded fixture assertions for OG/meta/font/anchor behavior. CI now installs vendored Hugo binaries from .github/vendor/bin (.deb on Linux and .pkg on macOS) using the version in .github/.hugo-version, while local bootstrap remains local-only and unchanged in intent. Templates now use partialCached, OG tags use correct permalink/absolute URL handling, heading anchors are implemented via layouts/_markup/render-heading.html, and obsolete regex anchor injection was removed.

Design

The design keeps CI simple and deterministic by concentrating logic in scripts and using checked-in Hugo installers so runners do not depend on external package feeds or release API behavior. Fixture-based output checks provide deterministic validation for a theme repository where the root is not itself a runnable Hugo site.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7265cd6681

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@GrantBirki GrantBirki merged commit 7f1799e into main Feb 24, 2026
6 checks passed
@GrantBirki GrantBirki deleted the codex/ci-and-upstream-hardening branch February 24, 2026 06:30
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.

1 participant