Skip to content
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
9 changes: 7 additions & 2 deletions skills/check-links/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,19 @@ sentinel (step 8), and report the failure with the next action.
### 0. Detect site root and work directory

Before any other step, determine `SITE_DIR` (the Hugo site root) and `WORK_DIR`
(the directory where `npm ci` / `hugo` commands run — mirrors `.github/workflows/check-links.yml`):
(the directory where `npm ci` / `hugo` commands run — mirrors `.github/workflows/check-links.yml`).
A site may keep its only Hugo config in the `_preview/` sub-tree
(e.g. `docs/_preview/hugo.toml`), so the same config paths count there too:

```bash
SITE_DIR=""
for dir in docs site; do
for cfg in hugo.toml hugo.yaml \
config/hugo.toml config/hugo.yaml \
config/_default/hugo.toml config/_default/hugo.yaml; do
config/_default/hugo.toml config/_default/hugo.yaml \
_preview/hugo.toml _preview/hugo.yaml \
_preview/config/hugo.toml _preview/config/hugo.yaml \
_preview/config/_default/hugo.toml _preview/config/_default/hugo.yaml; do
if [ -f "$dir/$cfg" ]; then
SITE_DIR="$dir"
break 2
Expand Down
3 changes: 2 additions & 1 deletion skills/pre-pr/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ Pre-PR progress:
explicitly asked to migrate away from Gradle Build Tools versioning.
- Hugo site: detect a site only when `docs/` or `site/` contains one of
`hugo.toml`, `hugo.yaml`, `config/hugo.toml`, `config/hugo.yaml`,
`config/_default/hugo.toml`, or `config/_default/hugo.yaml`.
`config/_default/hugo.toml`, or `config/_default/hugo.yaml`, either
directly or in its `_preview/` sub-tree (e.g. `docs/_preview/hugo.toml`).
- Classify changes:
- **proto** — any `*.proto` changed
- **code** — any `*.kt`, `*.kts`, or `*.java` changed
Expand Down
Loading