Repository navigation
Migrate onto docs-spec-template (doc mode) - #168
Merged
Merged
Conversation
docs-dev-guide was never seeded from docs-spec-template -- it predates it by ten months. PR #165 hand-copied the template's content layer (antora-playbook.yml, .gitignore, package.json) but left the build layer behind, which is why deploy-website.yml calls a scripts/build-pages-site.sh that has never existed here. Take the template-owned files wholesale from docs-spec-template main @7456637, per UPGRADING.md "Which files are whose", and switch the repo to doc mode with a .docmode file. Doc mode is the template's supported posture for non-ratified documentation; it keeps the PDF target, the Antora site and version identity from semver tags, and drops only the ratification layer. Not taken: * .vale.ini -- the template ships an empty (0-byte) file; ours is a real config. Reported upstream rather than forked. * scripts/update-spec-state.sh and SPEC_STATE.md -- ratification-only. tests/release-info-test.sh passes 78/78 in spec mode but fails 23 phase assertions when run from a doc-mode repo root, because it hardcodes spec-mode expectations for the repo it runs in. Nothing runs it in CI. Also reported upstream. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: Bill Traynor <wmat@riscv.org>
Shared files carry template structure and this repo's own values on the same lines, so they are merged rather than copied (UPGRADING.md "Shared files"). Makefile: take the template's version/date plumbing (VERSION from release-info.sh, DATE_STAMP, VERSION_NUM), the DOC_MODE switch, the stamp-antora target and the versioned PDF name. Keep this repo's DOCS, BUILD_DIR indirection and the git_sha.adoc rule, which the template has no equivalent for. In doc mode the Makefile passes a single -a doc-mode='doc' marker instead of the phase attribute set. antora.yml: keep name/title/page-group/asamBibliography, adopt the template's structure, and add doc-mode plus the cover-logo indirection that build-pages-site.sh needs for single-repo builds. Doc mode stamps exactly version, page-revnumber and page-revdate -- stamp-antora-version.sh requires those three and no phase keys. Also drop page-pdf_url. The UI bundle path-joins it rather than treating it as absolute, so it rendered on all 16 pages as /reference/docs-guide/v0.20/https://github.com/... -- broken twice over. The template has no such key. package.json: take the template's Antora 3.1.15 -> 3.2.0 bump and regenerate the lockfile with npm install --package-lock-only. Verified: stamp-antora-version.sh accepts the new antora.yml and reports "doc mode: phase surface not stamped"; the PDF target resolves to build/docs-dev-guide-v0.20-20260909.pdf. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: Bill Traynor <wmat@riscv.org>
modules/ROOT/pages/index.adoc hardcoded both the logo resource and the
version line, so a stamped antora.yml had no effect on what the cover
actually showed. Switch to the template's pattern: {cover-logo}, which
antora.yml maps to the shared `common` asset and build-pages-site.sh
rewrites to a vendored copy for single-repo builds, and
{page-revnumber}/{page-revdate}, which stamp-antora-version.sh drives.
This also fixes a malformed image attribute list -- [id="riscvlogo"xs,...]
was missing the comma and role=, so the size class was silently dropped.
src/docs-dev-guide.adoc declared no revision attributes at all, so the PDF
title page never showed a version. Add the template's ifndef fallbacks and
:revinfo:. The Makefile already passes -a revnumber/-a revdate from
release-info.sh, so these only apply to a bare asciidoctor run. Doc mode
means no phase attribute defaults are needed.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Bill Traynor <wmat@riscv.org>
Three workflows are superseded by the template-owned set adopted earlier in this branch: static.yml -- the stopgap Antora build added in #167 to get the site publishing again. publish-site.yml does the same job with version resolution, release-tag publishing and a pinned Kroki service container instead of public kroki.io. deploy-website.yml -- added in fb1578a from this same template, but without the scripts/ directory it calls. It has failed with exit 127 on every push since, and is byte-for-byte the workflow publish-site.yml now provides, with its dependencies present. vale-using-reusable.yml -- identical in content to the template's vale-linting.yml; only the filename differed. That leaves one Pages workflow rather than two racing for the same concurrency group, and the workflow set now matches the template exactly. No change was needed to version-bot.yml: the doc-mode gating MIGRATION.md describes (a mode output on tag-version, and && mode == 'spec' on milestone-pr) is already implemented upstream, so the SPEC_STATE.md job cannot fire here. That is also why scripts/update-spec-state.sh is deliberately absent. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: Bill Traynor <wmat@riscv.org>
UPGRADING.md section 1.3: nothing reads this file, but it is the only record of which template version the tooling came from, which turns the next upgrade into a diff rather than an investigation. Baseline is template main @7456637 rather than a release tag, because doc mode landed in template PR #150 and has not been tagged yet. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: Bill Traynor <wmat@riscv.org>
|
|
||
| jobs: | ||
| call-reusable-vale-workflow-in-riscv-vale-repo: | ||
| uses: riscv-admin/riscv-vale/.github/workflows/vale-reusable.yml@main |
The new content-source gate caught this: "target of xref not found: spec-sample:page.adoc". Line 47 shows an Antora cross-reference as an example of the syntax, but backticks alone do not stop AsciiDoc from substituting macros inside an inline code span, so Antora tried to resolve it as a real xref against a component (spec-sample) that only exists in the template. The identical xrefs further down the file are fine -- they sit inside a [source,adoc] listing block, which is verbatim. Wrap it in a + passthrough so it renders literally. Pre-existing since PR #165; the gate added in this branch is what surfaced it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: Bill Traynor <wmat@riscv.org>
This was referenced Sep 9, 2026
This was referenced Sep 9, 2026
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.
Finishes the migration PR #165 started, so this repo looks and behaves as if it
had been seeded from
docs-spec-template, at templatemain@7456637.Why
docs-dev-guidewas never seeded from the template — it predates it by tenmonths (created 2021-03-04 vs 2022-01-07;
template_repository: none).PR #165 hand-copied the template's content layer. The evidence is
unambiguous:
antora-playbook.ymlis byte-identical to the template's but forthree lines,
.gitignoreis byte-identical, andpackage.jsoncarries thetemplate's description verbatim. It left behind the build layer —
scripts/,ANTORA.md, and every template workflow.That is the direct cause of the current breakage.
deploy-website.yml(fb1578a)was copied from this same template and calls
./scripts/build-pages-site.sh,which has never existed here. It has failed with exit 127 on every push to
mainsince it was added. The.gitignoreonmainhas been advertising thatscript since #165 — the reference arrived, the file never did.
What this does
The repo runs in doc mode, the template's supported posture for non-ratified
documentation (
MIGRATION.md§"Doc mode", which names this repo as its workedexample). Doc mode keeps the PDF target, the Antora site, and version identity
from semver tags; it strips only the ratification layer.
Five commits, following the template's own
UPGRADING.md§A file-ownership split:scripts/,tests/, the sixworkflows,
ANTORA.md/MIGRATION.md/ARC_SUBMISSION.md/UPGRADING.md, plus.docmode.Makefile,antora.yml,package.json,.gitmodules. OurDOCS,BUILD_DIR,git_sha.adocrule,name,titleand
asamBibliographyare kept; the template's version plumbing is taken.publish-site.ymlreplaces bothstatic.ymlanddeploy-website.yml;vale-linting.ymlreplacesvale-using-reusable.yml..template-versionbaseline record, so the next upgrade is a diff ratherthan an investigation.
Fixed along the way
page-pdf_urldropped. The UI bundle path-joins it rather than treating itas absolute, so it rendered on all 16 pages as
/reference/docs-guide/v0.20/https://github.com/...— broken twice over.[id="riscvlogo"xs,...]was missinga comma and
role=, silently dropping the size class.src/docs-dev-guide.adocdeclared no revision attributes at all, which defeated the version lockstep this
tooling exists for. It now renders
v0.20-<sha>, 2026-09-09.Verification
release-info.sh modedoctests/release-info-test.shstamp-antora-version.shantora.yml; "doc mode: phase surface not stamped"npm run preview(Antora 3.2.0)scripts/build-pages-site.shmake build-containerKnown regression — please read
scripts/build-pages-site.shdoes not emithome/index.html, and the sharedUI bundle links to it from every page. I extracted the bundle to check whether it
is configurable:
nav.hbs— configurable viasite.keys.toc_home_link_pathheader-content.hbs— hardcoded{{siteRootPath}}/home/index.htmlbreadcrumbs.hbs— hardcodedTwo of the three cannot be configured away, so the header logo and the
"RISC-V Specifications" breadcrumb will 404 on all 16 pages. The stopgap
static.ymlfrom #167 emitted that redirect, so this is a regression againstwhat is live today.
This is a template bug affecting every seeded repo that publishes to Pages, not
something specific to us. Per
UPGRADING.md— local edits to template-owned files"belong upstream instead" — it is reported upstream as
riscv/docs-spec-template#151 rather than patched here.
Also reported upstream (riscv/docs-spec-template#152)
.vale.ini. Ours is a real config, so it wasdeliberately not overwritten.
tests/release-info-test.shfails 23 phase assertions when run from a doc-moderepo root (78/78 in spec mode). Nothing runs it in CI.
MIGRATION.md's doc-mode checklist asks forversion-bot.ymlchanges that arealready implemented upstream — the checklist is stale.
Unrelated wart worth knowing
This repo has a git tag named
main, which shadows the branch:git log mainwarns
refname 'main' is ambiguousand resolves to the tag. There is avmaintag too. Neither is a valid version, so
release-info.shfilters them and no tagcleanup was needed for this PR — but the
maintag is worth deleting separately.🤖 Generated with Claude Code