Skip to content
Open
38 changes: 38 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Changes

## 2026-06-08 — Antora structure and documentation site guidance

### New files

- `src/antora-structure.adoc` — New section documenting the Antora-based repository layout used by RISC-V specification repositories. Covers `antora.yml`, `modules/ROOT/pages/`, `modules/ROOT/nav.adoc`, `modules/ROOT/images/`, and how to register a specification with the RISC-V documentation site by submitting a pull request to [riscv-admin/antora-dev.riscv.org](https://github.com/riscv-admin/antora-dev.riscv.org). Includes content-source entry format, chapter numbering rules configuration, branch naming conventions, and Antora installation instructions.

### Modified files

**`src/docs-dev-guide.adoc`**
- Added `include::antora-structure.adoc[]` between `authoring.adoc` and `a_few_basics.adoc`.

**`src/authoring.adoc`**
- Updated repository reference from `docs-templates` to `docs-spec-template`.
- Replaced stale `asciidoctor book_header.adoc` quick-build command with the correct entry point (`asciidoctor modules/ROOT/pages/spec-sample.adoc`) and a `make` alternative.
- Updated description of template repo to reflect Antora-based directory structure.

**`src/a_few_basics.adoc`**
- Updated two references to `book_header.adoc` (lines 91 and 334) to `modules/ROOT/pages/spec-sample.adoc` in the docs-spec-template repo.

**`src/build-infrastructure.adoc`**
- Added `=== Source directory` subsection noting that `SRC_DIR` is now `modules/ROOT/pages/` and cross-referencing the antora-structure section.
- Added `[[spec-types]]` subsection distinguishing ISA specifications (authored on a branch/fork of riscv-isa-manual) from non-ISA specifications (authored in an autonomous repository using docs-spec-template).
- Added `[[spec-lifecycle]]` section defining the four specification states (Draft, Stable, Frozen, Ratified) with `:revremark:` examples and a link to `riscv.org/spec-state`.
- Documented that state advancement is entirely manual — no automation promotes a specification between states.
- Documented the non-ISA release process using the `workflow_dispatch` GitHub Actions trigger, including the `revision_mark` input and a note on keeping it consistent with `:revremark:` in the source.
- Documented that ISA specification state is managed within the relevant chapter(s) of the riscv-isa-manual branch where the author is working.

**`src/intro.adoc`**
- Added `[[getting-help]]` subsection consolidating help resources: `sig-documentation` mailing list, `help@riscv.org`, docs-dev-guide GitHub issues, and antora-dev.riscv.org GitHub issues.

**`local_build.md`**
- Updated `## AsciiDoc book headers and styles` section to reference `modules/ROOT/pages/spec-sample.adoc` as the document entry point and `docs-resources/global-config.adoc` for shared attributes.
- Updated `## Create and name a new .adoc file` to reflect the Antora workflow: new files go in `modules/ROOT/pages/`, are included in `spec-sample.adoc` for the PDF build, and registered in `modules/ROOT/nav.adoc` for the Antora site.
- Updated `## HTML build` section to use `make` and the correct entry point (`modules/ROOT/pages/spec-sample.adoc`) in place of stale `book_header.adoc` references.
- Added `## Antora site build` section covering `make antora`, output location, and Antora installation (`npm install -g antora`).
- Added `## Run a local Kroki server for diagrams` section with the Docker run command (`docker run -d -p 9870:8000 yuzutech/kroki`), a stop command, and a note that the dev playbook is already configured for `localhost:9870`.
90 changes: 69 additions & 21 deletions local_build.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,26 @@ wavedrom-cli

WARNING: For the MacOS, if you upgrade from a prior version to Big Sur, you must reinstall first the NPM and then the NPM version of the wavedrom-cli.

## Run a local Kroki server for diagrams

The RISC-V documentation site uses [Kroki](https://kroki.io) to render diagrams (including WaveDrom, Bytefield, Graphviz, and others) server-side. The dev playbook at `antora-dev.riscv.org` is configured to reach a local Kroki instance on port 9870.

Start the Kroki server with Docker:

```cmd
docker run -d -p 9870:8000 yuzutech/kroki
```

The `-d` flag runs it in the background. The container will restart automatically on subsequent Docker starts unless explicitly stopped.

To stop it:

```cmd
docker stop $(docker ps -q --filter ancestor=yuzutech/kroki)
```

The dev playbook already has `kroki-server-url: http://localhost:9870` set in its `asciidoc.attributes`, so no additional configuration is needed once the container is running.

## Graphviz is used for diagrams in some appendices

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd just kill this. We want svg files. They can suck it up and start creating them.


To support graphviz on the Mac, use brew
Expand Down Expand Up @@ -264,47 +284,75 @@ You can then add a bibliography to your appendices and use bibtex conventions to
Details of how to work with bibtex and the RISC-V bibliogrpahy are in the example.pdf file.


## AsciiDoc book headers and styles
## AsciiDoc document header and styles

Attributes in the book headers for RISC-V AsciiDoc content control aspects of the pdf build. Together with the `risc-v_spec-pdf.yml` file, they enable, among other things, numbered headings, a TOC, running headers and footers, footnotes at chapter ends, custom fonts, admonitions, an index, and an optional colophon.
Attributes in the document header for RISC-V AsciiDoc content control aspects of the pdf build. Together with the `docs-resources/themes/riscv-pdf.yml` file, they enable, among other things, numbered headings, a TOC, running headers and footers, footnotes at chapter ends, custom fonts, admonitions, an index, and an optional colophon.

In addition, properties in the book header within this repo point to the `images` directory and also the `resources/riscv-spec.bib` file that contains the RISC-V `bibtex` entries for use in creating a bibliography as one of the appendices.
The entry point for the build is `modules/ROOT/pages/spec-sample.adoc`. This file contains the document header attributes and uses `include::` directives to pull in the chapter files. The `docs-resources/global-config.adoc` submodule file provides shared attributes such as `:company:` and `:doctype:`.

For shorter documents, you have the option of using a report header, however, we have not yet provided branding for it.
NOTE: The header is already in the template. The only changes you normally need to make are to update `:revnumber:`, `:revremark:`, and author metadata, then add chapter files using `include::chapter.adoc[]` in the order you want them to appear.

NOTE: The headers are already in the template files. The only changes you normally need to make are to add chapter-sized sections in using the syntax `include::filename.adoc[]` in the order by which you want them to appear.
## Create and add a new chapter file

## Create and name a new .adoc file

- In your text editor, create a new file.
- Assign a name and save with the .adoc extension.
- In the first line, add `[file_name]` (using a meaningful string for the filename) and in the second line, use a double "==" to indicate a topic heading, add some content, and save the file with an `.adoc` file extension.
- In the header file, add `include::file_name.adoc` and save it.

NOTE: Blank lines are not allowed in between the `include::file_name.adoc` files.
- In your text editor, create a new file in `modules/ROOT/pages/`.
- Assign a meaningful name and save it with the `.adoc` extension.
- Begin the file with a section heading (`==`) rather than a document title (`=`), since it will be included into `spec-sample.adoc`.
- Add an `include::chapter-name.adoc[]` line in `modules/ROOT/pages/spec-sample.adoc` in the position where you want the chapter to appear.
- Add an `xref:chapter-name.adoc[Chapter Title]` entry to `modules/ROOT/nav.adoc` so the chapter appears in the Antora site navigation.

## HTML build

Building in HTML is a good way to check that your content under development builds properly.

As soon as you have installed Asciidoctor, you can build HTML content from any `.adoc` file on your own machine--simply CD into the directory that contains your `.adoc` files and run the following:
The simplest approach from the repository root is:

```cmd
make
```

This builds both PDF and HTML output to the `build/` directory, using Docker if available or native tooling otherwise.

To build HTML only without the Makefile, run:

```cmd
asciidoctor modules/ROOT/pages/spec-sample.adoc
```

For pdf output without the Makefile, cd into the repository root and use:

```cmd
asciidoctor-pdf -r asciidoctor-mathematical -a mathematical-format=svg \
-r asciidoctor-bibtex -r asciidoctor-diagram \
-a pdf-theme=docs-resources/themes/riscv-pdf.yml \
-a pdf-fontsdir=docs-resources/fonts/ \
modules/ROOT/pages/spec-sample.adoc
```

ALERT: When copying/pasting commands for the CLI on the Windows OS, check that no substitutions are being made. We have seen the `=` get replaced with a `#`, causing an error message about fonts.

## Antora site build

To preview how the specification will appear as a multi-page HTML site (as it will be published on the RISC-V documentation site), use:

```cmd
asciidoctor any_file_name.adoc
make antora
```
This generates a file named `any_file_name.html`.

For pdf output, cd into this cloned directory and use this command:
Output is written to `build/site/`. This requires Node.js 18+ and either `antora` on your PATH or `npx` available.

### Install Antora

```cmd
asciidoctor-pdf -r asciidoctor-mathematical -a mathematical-format=svg -r asciidoctor-bibtex -r asciidoctor-diagram book_header.adoc -a pdf-style=resources/themes/riscv-pdf.yml -a pdf-fontsdir=resources/fonts/
npm install -g antora
```

This generates a file named `book_header.pdf` that makes use of the graphics, styles, and fonts that is identical to example.pdf.
Verify:

ALERT: When copying/pasting commands for the CLI on the Windows OS, check that no substitutions are being made. We have seen the '=' get replaced with a '#', causing an error message about fonts.
```cmd
antora --version
```

For your own content, change the name of the header file to a meaningful file name, and change the `include::filename.adoc` as needed.
If you prefer not to install globally, `make antora` will automatically fall back to `npx antora` if `antora` is not on your PATH.

## AsciiDoc and Asciidoctor toolchain documentation

Expand Down
4 changes: 2 additions & 2 deletions src/a_few_basics.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
Index
```

NOTE: Settings in the header file (`book_header.adoc` in the docs-templates repo) trigger auto-generation of Appendix prefixes and of the Index (among other things).
NOTE: Settings in the header file (`modules/ROOT/pages/spec-sample.adoc` in the docs-spec-template repo) trigger auto-generation of Appendix prefixes and of the Index (among other things).

Check failure on line 91 in src/a_few_basics.adoc

View workflow job for this annotation

GitHub Actions / vale

[vale] src/a_few_basics.adoc#L91

[Vale.Spelling] Did you really mean 'repo'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'repo'?", "location": {"path": "src/a_few_basics.adoc", "range": {"start": {"line": 91, "column": 100}}}, "severity": "ERROR"}

=== Lists

Expand Down Expand Up @@ -331,7 +331,7 @@

==== Table captions

The `book_header.adoc` file in the docs-templates repo sets the `full` cross-reference attribute to enable captions to display from targets in the anchors. This ability allows you to set captions for tables, blocks, and illustrations. If you do not provide a caption, Asciidoctor defaults to the _basic_ cross reference style.
The `modules/ROOT/pages/spec-sample.adoc` file in the docs-spec-template repo sets the `full` cross-reference attribute to enable captions to display from targets in the anchors. This ability allows you to set captions for tables, blocks, and illustrations. If you do not provide a caption, Asciidoctor defaults to the _basic_ cross reference style.

Check failure on line 334 in src/a_few_basics.adoc

View workflow job for this annotation

GitHub Actions / vale

[vale] src/a_few_basics.adoc#L334

[Vale.Spelling] Did you really mean 'repo'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'repo'?", "location": {"path": "src/a_few_basics.adoc", "range": {"start": {"line": 334, "column": 74}}}, "severity": "ERROR"}

To set a caption for a table or image, use the pattern as follows:

Expand Down
162 changes: 162 additions & 0 deletions src/antora-structure.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
[[antora-structure]]
== Antora repository structure

RISC-V specification repositories use an https://docs.antora.org[Antora]-compatible directory structure. This enables individual specification repositories to be assembled into the RISC-V documentation site by Antora while also supporting a standalone PDF and HTML build via `make`.

Check failure on line 4 in src/antora-structure.adoc

View workflow job for this annotation

GitHub Actions / vale

[vale] src/antora-structure.adoc#L4

[Vale.Spelling] Did you really mean 'Antora'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'Antora'?", "location": {"path": "src/antora-structure.adoc", "range": {"start": {"line": 4, "column": 211}}}, "severity": "ERROR"}

=== Repository layout

A specification repository contains the following top-level files and directories:

----
antora.yml <1>
Makefile <2>
docs-resources/ <3>
modules/
ROOT/
nav.adoc <4>
images/ <5>
pages/ <6>
spec-sample.adoc
intro.adoc
chapter2.adoc
example.bib <7>
...

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add resources for bibliographies?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also partials? I know I know - not many have wavedrom files. but still....

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, added that in with my last push.

partials/ <8>
----
<1> Antora component descriptor — identifies this repo as an Antora component and provides component metadata and configuration.

Check failure on line 26 in src/antora-structure.adoc

View workflow job for this annotation

GitHub Actions / vale

[vale] src/antora-structure.adoc#L26

[Vale.Spelling] Did you really mean 'Antora'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'Antora'?", "location": {"path": "src/antora-structure.adoc", "range": {"start": {"line": 26, "column": 5}}}, "severity": "ERROR"}

Check failure on line 26 in src/antora-structure.adoc

View workflow job for this annotation

GitHub Actions / vale

[vale] src/antora-structure.adoc#L26

[Vale.Spelling] Did you really mean 'repo'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'repo'?", "location": {"path": "src/antora-structure.adoc", "range": {"start": {"line": 26, "column": 51}}}, "severity": "ERROR"}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

antora.yml - An antora component descriptor that identifies ...

<2> Makefile — drives the PDF/HTML build.

Check failure on line 27 in src/antora-structure.adoc

View workflow job for this annotation

GitHub Actions / vale

[vale] src/antora-structure.adoc#L27

[Vale.Spelling] Did you really mean 'Makefile'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'Makefile'?", "location": {"path": "src/antora-structure.adoc", "range": {"start": {"line": 27, "column": 5}}}, "severity": "ERROR"}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it doesn't though? Maybe for local PDFs and the weird HTML, but you are implying that Makefile controls all the build stuff. Are we recommending that people use the Makefile for building PDFs still?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From Antora's POV the antora.yml is what makes it a component to be targetted. However, Make is still the way to build.

<3> Git submodule providing shared fonts, themes, and images.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs-resources - Git submodule....

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I understand what you mean.

<4> Navigation file — defines the sidebar structure for the Antora site.

Check failure on line 29 in src/antora-structure.adoc

View workflow job for this annotation

GitHub Actions / vale

[vale] src/antora-structure.adoc#L29

[Vale.Spelling] Did you really mean 'Antora'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'Antora'?", "location": {"path": "src/antora-structure.adoc", "range": {"start": {"line": 29, "column": 61}}}, "severity": "ERROR"}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nav.adoc - The navigation file that defines....

<5> Symlink to `docs-resources/images` so Antora can find shared images.

Check failure on line 30 in src/antora-structure.adoc

View workflow job for this annotation

GitHub Actions / vale

[vale] src/antora-structure.adoc#L30

[Vale.Spelling] Did you really mean 'Antora'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'Antora'?", "location": {"path": "src/antora-structure.adoc", "range": {"start": {"line": 30, "column": 43}}}, "severity": "ERROR"}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is? I also put shared images into the common assets folder in antora-dev.riscv.org

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought you also put any graphics for the topic in here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess some of this only applies to ISA content, which would already be convered by the fact that you branch the ISA repo to develop a new ISA spec.

<6> All AsciiDoc source files live here.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pages directory - all AsciiDoc source files live here.

<7> BibTeX bibliography file. Referenced by `spec-sample.adoc` via the `:bibtex-file:` attribute.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't this go in resources folder?

<8> Optional directory for reusable AsciiDoc fragments (partials), such as Wavedrom diagram source files or content shared across chapters. Reference partials with `include::partial$filename.adoc[]`.

Check failure on line 33 in src/antora-structure.adoc

View workflow job for this annotation

GitHub Actions / vale

[vale] src/antora-structure.adoc#L33

[Vale.Spelling] Did you really mean 'Wavedrom'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'Wavedrom'?", "location": {"path": "src/antora-structure.adoc", "range": {"start": {"line": 33, "column": 76}}}, "severity": "ERROR"}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

partials - optional directory ....


=== antora.yml

The `antora.yml` file at the repository root is the Antora https://docs.antora.org/antora/latest/component-version-descriptor/[component descriptor]. It serves two purposes: it identifies the repository as an Antora content component, and it provides the component metadata and configuration (name, title, version, navigation, and AsciiDoc attributes) used when the documentation site is assembled.

Check failure on line 37 in src/antora-structure.adoc

View workflow job for this annotation

GitHub Actions / vale

[vale] src/antora-structure.adoc#L37

[Vale.Spelling] Did you really mean 'Antora'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'Antora'?", "location": {"path": "src/antora-structure.adoc", "range": {"start": {"line": 37, "column": 53}}}, "severity": "ERROR"}

Check failure on line 37 in src/antora-structure.adoc

View workflow job for this annotation

GitHub Actions / vale

[vale] src/antora-structure.adoc#L37

[Vale.Spelling] Did you really mean 'Antora'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'Antora'?", "location": {"path": "src/antora-structure.adoc", "range": {"start": {"line": 37, "column": 210}}}, "severity": "ERROR"}

[source,yaml]
----
name: spec-sample <1>
title: RISC-V Example Specification (Zexmpl) <2>
version: ~ <3>
nav:
- modules/ROOT/nav.adoc <4>
----
<1> Component name — used in Antora cross-references from other components (`xref:spec-sample:page.adoc[]`). Rename to match your specification.

Check failure on line 47 in src/antora-structure.adoc

View workflow job for this annotation

GitHub Actions / vale

[vale] src/antora-structure.adoc#L47

[Vale.Spelling] Did you really mean 'Antora'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'Antora'?", "location": {"path": "src/antora-structure.adoc", "range": {"start": {"line": 47, "column": 30}}}, "severity": "ERROR"}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also becomes the name in the URL so be specific.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plus match what? I'm not sure what they are matching to?

<2> Human-readable title shown in the site UI. Update this for your specification.
<3> `~` means unversioned. Set to a version string (e.g., `1.0`) once the specification is released.

Check failure on line 49 in src/antora-structure.adoc

View workflow job for this annotation

GitHub Actions / vale

[vale] src/antora-structure.adoc#L49

[Vale.Spelling] Did you really mean 'unversioned'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'unversioned'?", "location": {"path": "src/antora-structure.adoc", "range": {"start": {"line": 49, "column": 15}}}, "severity": "ERROR"}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they should be using some sort of version here though?

<4> Path to the navigation file, relative to `antora.yml`.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if they use the correct set up, this should always be the same.


When creating a new specification repository from the template, at minimum rename `name` and `title` to match your specification.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rather than at minimum, tell them to set the name, title, and version... Versions should be probably set as "frozen" "development" or "stable" or whatever we decide.

They should also include a page-group.

asciidoc:
attributes:
page-group: under-development


=== modules/ROOT/pages/

All AsciiDoc source files live in `modules/ROOT/pages/`. This is the Antora convention for the default (ROOT) module's page content.

Check failure on line 56 in src/antora-structure.adoc

View workflow job for this annotation

GitHub Actions / vale

[vale] src/antora-structure.adoc#L56

[Vale.Spelling] Did you really mean 'Antora'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'Antora'?", "location": {"path": "src/antora-structure.adoc", "range": {"start": {"line": 56, "column": 70}}}, "severity": "ERROR"}

The entry point for the standalone PDF and HTML build is `spec-sample.adoc`, which uses AsciiDoc `include::` directives to pull in the other chapter files. For the Antora site build, each file in `pages/` becomes a separate HTML page.

Check failure on line 58 in src/antora-structure.adoc

View workflow job for this annotation

GitHub Actions / vale

[vale] src/antora-structure.adoc#L58

[Vale.Spelling] Did you really mean 'Antora'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'Antora'?", "location": {"path": "src/antora-structure.adoc", "range": {"start": {"line": 58, "column": 165}}}, "severity": "ERROR"}

When adding a new chapter:

. Create the `.adoc` file in `modules/ROOT/pages/`.
. Add an `include::` directive for it in `spec-sample.adoc` (for the PDF build).
. Add an `xref:` entry for it in `modules/ROOT/nav.adoc` (for the Antora site build).

Check failure on line 64 in src/antora-structure.adoc

View workflow job for this annotation

GitHub Actions / vale

[vale] src/antora-structure.adoc#L64

[Vale.Spelling] Did you really mean 'Antora'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'Antora'?", "location": {"path": "src/antora-structure.adoc", "range": {"start": {"line": 64, "column": 67}}}, "severity": "ERROR"}

=== modules/ROOT/nav.adoc

The `nav.adoc` file defines the navigation sidebar shown in the Antora site. It uses a nested list of `xref:` macros.

Check failure on line 68 in src/antora-structure.adoc

View workflow job for this annotation

GitHub Actions / vale

[vale] src/antora-structure.adoc#L68

[Vale.Spelling] Did you really mean 'Antora'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'Antora'?", "location": {"path": "src/antora-structure.adoc", "range": {"start": {"line": 68, "column": 65}}}, "severity": "ERROR"}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sidebar is confusing because that makes me think of the right nav, which is controlled by the headings on the page.


[source,adoc]
----
* xref:spec-sample.adoc[RISC-V Example Specification]
** xref:intro.adoc[Introduction]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very few of them actually nest. We just made them flat.

** xref:chapter2.adoc[The Second Chapter]
** xref:contributors.adoc[Contributors]
** xref:bibliography.adoc[Bibliography]
----

Add a new entry here each time you add a chapter to `pages/`. The order of entries controls the sidebar order.

=== modules/ROOT/images/

This directory is a symlink to `docs-resources/images`, which contains the shared RISC-V logo and other common images. Antora requires images to be located within the module directory tree, which is why the symlink exists rather than referencing `docs-resources/` directly.

Check failure on line 83 in src/antora-structure.adoc

View workflow job for this annotation

GitHub Actions / vale

[vale] src/antora-structure.adoc#L83

[Vale.Spelling] Did you really mean 'Antora'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'Antora'?", "location": {"path": "src/antora-structure.adoc", "range": {"start": {"line": 83, "column": 120}}}, "severity": "ERROR"}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is true.


Place any specification-specific images in this directory alongside the symlinked shared images, or manage them via the symlink target in `docs-resources/`.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for all jpg, png, and svg (with svg being the preferred). They don't need to include the risc-v logo because that is in the common-assets folder in antora-dev. But not sure how they are going to get that building locally.


[[dev-playbook]]
=== Publishing to the RISC-V documentation site

The RISC-V documentation site is assembled from all specification repositories by a central Antora playbook maintained at https://github.com/riscv-admin/antora-dev.riscv.org[riscv-admin/antora-dev.riscv.org]. Specification authors do not manage their own playbook — instead, they submit a pull request to that repository to register their specification as a content source.

Check failure on line 90 in src/antora-structure.adoc

View workflow job for this annotation

GitHub Actions / vale

[vale] src/antora-structure.adoc#L90

[Vale.Spelling] Did you really mean 'Antora'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'Antora'?", "location": {"path": "src/antora-structure.adoc", "range": {"start": {"line": 90, "column": 93}}}, "severity": "ERROR"}

==== Naming your branch

By convention, Antora-ready branches are named with the version and an `-antora` suffix:

----
v1.0-antora
v20250312-antora
----

Create this branch from your specification's release tag or working branch once the Antora directory structure is in place.

Check failure on line 101 in src/antora-structure.adoc

View workflow job for this annotation

GitHub Actions / vale

[vale] src/antora-structure.adoc#L101

[Vale.Spelling] Did you really mean 'Antora'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'Antora'?", "location": {"path": "src/antora-structure.adoc", "range": {"start": {"line": 101, "column": 85}}}, "severity": "ERROR"}

==== Adding a content source

In the playbook at `antora/antora-playbook.yml`, add an entry to the `content.sources` list. Use an existing entry as a model and follow the comment convention used throughout the file:

[source,yaml]
----
# My Specification — component: my-spec | chapters 5–12
- url: https://github.com/riscv/my-spec.git
branches: [v1.0-antora]
start_page: ROOT::index.adoc
start_path: /
worktrees: true
submodules: true
----

The `component` name in the comment must match the `name` field in your `antora.yml`. Set `submodules: true` if your repository uses git submodules (e.g., `docs-resources`). Set `worktrees: true` if your repository contains symlinks.

==== Adding numbering rules

The playbook uses custom extensions to number chapters and appendices in the site navigation. Add a corresponding entry for your specification to both the `nav_numbering_extension` and `section_numbering_extension` blocks. Both blocks share the same rules via a YAML anchor (`&numbering_rules` / `*numbering_rules`), so you only need to add your entry once, in the `nav_numbering_extension` block:

Check failure on line 122 in src/antora-structure.adoc

View workflow job for this annotation

GitHub Actions / vale

[vale] src/antora-structure.adoc#L122

[RedHat.TermsErrors] Use 'appendixes' rather than 'appendices'.
Raw output
{"message": "[RedHat.TermsErrors] Use 'appendixes' rather than 'appendices'.", "location": {"path": "src/antora-structure.adoc", "range": {"start": {"line": 122, "column": 60}}}, "severity": "ERROR"}

[source,yaml]
----
# --- My Specification --------------------------------------------------
- component: my-spec <1>
module: ROOT <2>
branches: ['v1.0-antora'] <3>
chapters: {start: 5, end: 12} <4>
appendices: {start: 13, end: 14} <5>
----
<1> Must match the `name` in your `antora.yml`.
<2> Use `ROOT` for single-module specifications (the standard case).
<3> Must match the branch name(s) listed in your `content.sources` entry.
<4> The range of nav entries (top-level `*` items in `nav.adoc`) that are numbered chapters. Count from the first entry in `nav.adoc` — entries before your first chapter (e.g., a preface or overview page) are typically at position 1–4.
<5> Omit this line entirely if your specification has no appendices.

Check failure on line 137 in src/antora-structure.adoc

View workflow job for this annotation

GitHub Actions / vale

[vale] src/antora-structure.adoc#L137

[RedHat.TermsErrors] Use 'appendixes' rather than 'appendices'.
Raw output
{"message": "[RedHat.TermsErrors] Use 'appendixes' rather than 'appendices'.", "location": {"path": "src/antora-structure.adoc", "range": {"start": {"line": 137, "column": 58}}}, "severity": "ERROR"}

==== Submitting the pull request

. Fork or branch https://github.com/riscv-admin/antora-dev.riscv.org[riscv-admin/antora-dev.riscv.org].
. Add your content source and numbering rules to `antora/antora-playbook.yml` as described above.
. Open a pull request against the `main` branch with a brief description of the specification being added.

[[install-antora]]
=== Installing Antora

Antora is needed to run a local site preview. It requires Node.js version 18 or later. Once Node.js is installed, install Antora globally:

Check failure on line 148 in src/antora-structure.adoc

View workflow job for this annotation

GitHub Actions / vale

[vale] src/antora-structure.adoc#L148

[Vale.Spelling] Did you really mean 'Antora'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'Antora'?", "location": {"path": "src/antora-structure.adoc", "range": {"start": {"line": 148, "column": 1}}}, "severity": "ERROR"}

Check failure on line 148 in src/antora-structure.adoc

View workflow job for this annotation

GitHub Actions / vale

[vale] src/antora-structure.adoc#L148

[Vale.Spelling] Did you really mean 'Antora'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'Antora'?", "location": {"path": "src/antora-structure.adoc", "range": {"start": {"line": 148, "column": 123}}}, "severity": "ERROR"}

[source,cmd]
----
npm install -g antora
----

Verify the installation:

[source,cmd]
----
antora --version
----

For Node.js installation instructions, see https://nodejs.org/en/download/[nodejs.org].
Loading
Loading