Repository navigation
Build a _preview/ Hugo config only from _preview/ - #54
Merged
Merged
Conversation
Hugo finds a config in `$SITE_DIR/_preview/` only when it runs there. When that was the only config and the only lockfile was `$SITE_DIR/package-lock.json`, step 0 fell back to `WORK_DIR=$SITE_DIR`, and the build would fail with "Unable to locate config file". Step 0 now saves the matched path in `SITE_CFG`, and the `$SITE_DIR` fallback applies to site-root configs only. A `_preview/` config without `_preview/package-lock.json` is an error, like any config without a lockfile to build it with, and the message names the config. This mirrors the fix to the "Detect docs site" step of `check-links.yml` in SpineEventEngine/config#827, raised by its Codex review. Checked by running the step 0 snippet against validation and documentation (both `docs/_preview`, unchanged) and fixtures. Only that layout changes its outcome: `WORK_DIR=docs` → error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
There was a problem hiding this comment.
🟢 Approved
No active review issues remain for the working-directory selection update.
No open issues 🎉
What changed in this PR
This follow-up to #53 corrects working-directory selection in the shared check-links skill so a Hugo config under _preview/ cannot fall back to a build from the site root.
Changes:
- Records the detected config path in
SITE_CFG. - Restricts the site-root lockfile fallback to site-root configs.
- Documents the
_preview/package-lock.jsonrequirement and names the detected config in the error message.
| File | Description |
|---|---|
skills/check-links/SKILL.md |
Updates Step 0’s directory-selection logic, explanation, and missing-lockfile error. |
Review effort: Balanced
alexander-yevsyukov
added a commit
to SpineEventEngine/config
that referenced
this pull request
Nov 2, 2026
Brings in SpineEventEngine/agents#54, the skill side of the previous commit: step 0 of the `check-links` skill now builds a `_preview/` Hugo config only from `_preview/`, as the "Detect docs site" step of `check-links.yml` does. #54 changes only `skills/check-links/SKILL.md`, so the hook scripts wired in `.claude/settings.json` and `.codex/hooks.json` are as they were at `01b89c3`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #53. Hugo finds a config in
$SITE_DIR/_preview/only when it runs there. Say the only config isdocs/_preview/hugo.tomland the only lockfile isdocs/package-lock.json. Step 0 ofcheck-linksthen fell back toWORK_DIR=docs, and the build would fail with "Unable to locate config file".Change
SITE_CFG.$SITE_DIRfallback now applies to site-root configs only. A_preview/config needs_preview/package-lock.json.Found docs/_preview/hugo.toml but no package-lock.json to build it with.The old "No package-lock.json found under …" would be wrong in this case, because there is one.This mirrors the same fix to the "Detect docs site" step of
check-links.ymlin SpineEventEngine/config#827, which its Codex review raised.Verification
I ran the step 0 snippet, before and after this change:
c72021eWORK_DIR=docs/_preview3f69c93WORK_DIR=docs/_previewdocs/hugo.tomlwithdocs/package-lock.jsonWORK_DIR=docssite/_preview/config/_default/hugo.yamlwith a lockfileWORK_DIR=site/_previewdocs/_preview/hugo.tomlwith onlydocs/package-lock.jsonWORK_DIR=docs🤖 Generated with Claude Code