Skip to content

Restore the template's front and back matter - #169

Merged
Bill Traynor (wmat) merged 1 commit into
mainfrom
chore/template-migration
Sep 9, 2026
Merged

Bill Traynor (wmat) merged 1 commit into
mainfrom
chore/template-migration

Conversation

@wmat

Copy link
Copy Markdown
Collaborator

Follow-up to #168. That PR merged while this commit was still being written, so
it needs its own.

#168 aligned the tooling with docs-spec-template. Comparing the result
file-by-file against the template afterwards showed the tooling matched — 19 of 20
template-owned files byte-identical — but the document did not. Two gaps:

1. The PDF assembler was missing the template's structure

UPGRADING.md calls src/<spec>.adoc "the one file that is both": ownership rules
say don't copy it, but the structural requirements live in it. Ours was missing
five elements the template's carries.

Element Now renders
include::../docs-resources/global-config.adoc[] shared :company:, :url-riscv:, :doctype: — local copies removed
toc::[] (:toc: left → :toc: macro) pages 1–4
list-of::image / table / listing pages 5, 6, 7
[index] == Index page 73, ahead of the bibliography

Both the global-config.adoc include and the [index] macro are PDF-only and
live in the assembler, never in a page — the cross-repo relative include cannot
resolve under Antora, and Antora generates no back-of-book index (MIGRATION.md
Step 7).

2. contributors.adoc and copyright.adoc were deleted and never replaced

PR #165 removed src/contributors.adoc and src/colophon.adoc. Both are
recreated as pages, included by the assembler (copyright p8, contributors p9) and
listed in the nav, so each has a single source — rather than the template's
arrangement, which duplicates the copyright text inline in the assembler.

The contributor list is real and needs curating. The deleted file still held
the template's Author1 <required1@email.com> placeholders, so restoring it
verbatim would have published fake names. These are the actual commit authors from
git shortlog, de-duplicated across aliases (wmat/Bill Traynor, three elisa
variants), bots dropped, alphabetised by surname. Names only, no addresses. Git
authorship is not the same as consent to be listed publicly, so please review
before a release.

The license text follows LICENSE (CC-BY 4.0).

Also fixed: the guide contradicted itself

author-quickstart.adoc callouts <4> and <5> stated that contributors and
copyright are "HTML only -- not part of the PDF". That was already wrong about
the template — whose assembler includes both — and this change would have made the
guide contradict its own build output. Corrected. Callout <2> is deliberately
untouched: the landing page really is HTML-only.

Nav placement

Both entries are appended as back matter rather than placed up front where the
template puts them. The central playbook's numbering_rules for this component
keys chapters off line numbers in nav.adoc (MIGRATION.md Step 11), so
inserting at the top would silently shift every chapter's numbering on the central
site.

Verification

  • npm run preview → exit 0; contributors.html and copyright.html render
  • content-source gate criterion (error/fatal, less the expected common:: logo) →
    no matches
  • make build-container → PDF and HTML build; all seven new sections confirmed in
    the extracted PDF text, not just in source

Rebased onto main after #168 merged; both builds re-run green on the new base.

🤖 Generated with Claude Code

The PDF assembler was missing five structural elements the template's
carries, and PR #165 deleted the contributors and copyright pages without
replacing them. UPGRADING.md calls the assembler "the one file that is
both" -- the file ownership rules say not to touch, where the structural
requirements actually live.

Assembler:
  * include ../docs-resources/global-config.adoc for the shared :company:,
    :url-riscv: and :doctype: attributes, replacing local copies. PDF-only:
    the cross-repo relative include cannot resolve under Antora, which is
    why it belongs here and never in a page.
  * :toc: left -> :toc: macro plus an explicit toc::[], so the TOC follows
    the front matter rather than floating to a sidebar.
  * List of figures / tables / listings prefaces.
  * [index] == Index ahead of the bibliography. PDF-only; Antora does not
    generate a back-of-book index.

Pages: recreate contributors.adoc and copyright.adoc. Both are included by
the assembler and listed in the nav, so each has a single source rather
than the template's duplicated copyright text. Contributors are the real
commit authors from git history, de-duplicated and alphabetised by surname
-- the file PR #165 deleted still held the template's Author1/Author2
placeholders. Names only, no addresses; worth curating before a release.
The license follows LICENSE (CC-BY 4.0).

nav.adoc: both entries appended as back matter rather than placed up front
as the template does, so the chapter line numbers do not shift -- the
central playbook's numbering_rules keys chapters off line numbers in this
file (MIGRATION.md Step 11).

author-quickstart.adoc: callouts <4> and <5> claimed contributors and
copyright were "HTML only -- not part of the PDF". That was already wrong
about the template, whose assembler includes both, and this change makes
it self-contradictory. Callout <2> is untouched: the landing page really
is HTML-only.

Verified: PDF renders TOC (p1-4), the three lists (p5-7), copyright (p8),
contributors (p9) and Index (p73); Antora builds clean with both new pages.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Bill Traynor <wmat@riscv.org>
@wmat
Bill Traynor (wmat) merged commit 33c7590 into main Sep 9, 2026
9 checks passed
Bill Traynor (wmat) added a commit that referenced this pull request Sep 11, 2026
Match the template's nav.adoc: the title page (index.adoc) is the
top-level entry, and copyright, contributors, the introduction and then
the chapters are nested under it, in that order. The PDF already opens
title page, copyright, contributors, Chapter 1.

The nav had no title-page entry at all, which MIGRATION.md Step 9 asks
for ("landing page first"), and carried copyright and contributors at the
end. They went there in #169 on the stated grounds that the central
playbook numbers this component's chapters by line number in this file.
That was never checked and is wrong: docs-dev-guide's content source is
commented out in both antora.riscv.org and antora-dev.riscv.org, and
neither has a numbering rule for docs-guide. The comment asserting it is
removed. In its place is the template's own header comment, which warns
about line-number coupling in general terms -- true once this guide is
registered centrally.

The `.Authoring and Editing RISC-V Specs` nav title goes too: the
title-page entry, labelled with the component title, takes its place, as
in the template.

antora-structure.adoc: the guide's example nav -- the one template users
copy -- listed spec-sample.adoc as the landing page (the template's is
index.adoc), put contributors after the chapters, and left out copyright.
It now matches the template's nav.adoc entry for entry.

Verified: Antora builds with the same single pre-existing warning and no
errors; the rendered sidebar reads RISC-V Authoring and Editing Guide >
Copyright and license information > Contributors > Introduction > ...,
nested under the title page.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Bill Traynor <wmat@riscv.org>
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