Skip to content

Unit 8: Wire docs.halos.fi to the anchor checker #146

Description

@mairas

Target repo: halos-org/docs.halos.fi

Goal: The package gets a consumer that does not wait on PR
#47, and the HaLOS docs site gains a
check it does not have today.

Requirements: R3, R16

Dependencies: Unit 3

Files:

  • Modify: pyproject.toml
  • Modify: .github/workflows/ci.yml

Approach:

  • Add the package as a git-tag-pinned dependency.
  • The existing build job already runs uv sync and mkdocs build --strict,
    so anchor validation is one added step against the built site/ directory,
    placed after the build and before the migration-script comparison.
  • Exclude print_page/ — see Unit 3. Measured on a main build, that single
    generated page accounts for all 690 broken anchors and the 36 content pages
    are clean, so the step goes green on main from the first run.
  • No i18n, no translation gate, no shared-workflow call.

Test scenarios:

  • Integration: a branch introducing a link to a heading that does not exist
    fails CI at the anchor step.
  • Happy path: main with print_page/ excluded passes the new step. This was
    measured during planning, not assumed.
  • Edge case: without the exclusion the step fails on generated output alone —
    confirm the exclusion is what makes the difference, so nobody later removes it
    believing it to be decoration.

Verification:

  • CI green on main, red on a scratch branch with a deliberately broken
    fragment in a content page.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions