Skip to content

153 add instructions for antora based spec template#154

Open
Bill Traynor (wmat) wants to merge 14 commits into
mainfrom
153-add-instructions-for-antora-based-spec-template
Open

153 add instructions for antora based spec template#154
Bill Traynor (wmat) wants to merge 14 commits into
mainfrom
153-add-instructions-for-antora-based-spec-template

Conversation

@wmat

Copy link
Copy Markdown
Collaborator

No description provided.

Signed-off-by: Bill Traynor wmat@riscv.org
Signed-off-by: Bill Traynor wmat@riscv.org
Signed-off-by: Bill Traynor wmat@riscv.org
Signed-off-by: Bill Traynor wmat@riscv.org
Signed-off-by: Bill Traynor wmat@riscv.org
Signed-off-by: wmat <wmat@riscv.org>
Signed-off-by: Bill Traynor wmat@riscv.org
Signed-off-by: wmat <wmat@riscv.org>
Signed-off-by: Bill Traynor wmat@riscv.org
Signed-off-by: wmat <wmat@riscv.org>
Signed-off-by: Bill Traynor wmat@riscv.org
Signed-off-by: wmat <wmat@riscv.org>
…ttps://github.com/riscv/docs-dev-guide into 153-add-instructions-for-antora-based-spec-template

Signed-off-by: wmat <wmat@riscv.org>
Comment thread src/antora-structure.adoc
spec-sample.adoc
intro.adoc
chapter2.adoc
...

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.

Comment thread src/antora-structure.adoc Outdated
chapter2.adoc
...
----
<1> Antora component descriptor — identifies this repo as an Antora component.

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.

This should probably be antora.yml - the antora component descriptor that identifies this repo as an Antora component.

But doesn't it do more than that? The antora.yml files contains all the config stuff for your build.

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.

Expanded a bit with my last push.

Signed-off-by: Bill Traynor wmat@riscv.org
Comment thread src/antora-structure.adoc
partials/ <8>
----
<1> Antora component descriptor — identifies this repo as an Antora component and provides component metadata and configuration.
<2> Makefile — drives the PDF/HTML build.

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.

Comment thread src/antora-structure.adoc
<2> Makefile — drives the PDF/HTML build.
<3> Git submodule providing shared fonts, themes, and images.
<4> Navigation file — defines the sidebar structure for the Antora site.
<5> Symlink to `docs-resources/images` so Antora can find shared 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.

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.

Comment thread src/antora-structure.adoc
----
<1> Antora component descriptor — identifies this repo as an Antora component and provides component metadata and configuration.
<2> Makefile — drives the PDF/HTML 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.

Comment thread src/antora-structure.adoc
...
partials/ <8>
----
<1> Antora component descriptor — identifies this repo as an Antora component and provides component metadata and configuration.

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 ...

Comment thread src/antora-structure.adoc
<1> Antora component descriptor — identifies this repo as an Antora component and provides component metadata and configuration.
<2> Makefile — drives the PDF/HTML build.
<3> Git submodule providing shared fonts, themes, and images.
<4> Navigation file — defines the sidebar structure for the Antora site.

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....

Comment thread src/antora-structure.adoc
<3> Git submodule providing shared fonts, themes, and images.
<4> Navigation file — defines the sidebar structure for the Antora site.
<5> Symlink to `docs-resources/images` so Antora can find shared images.
<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.

Comment thread src/antora-structure.adoc
<4> Navigation file — defines the sidebar structure for the Antora site.
<5> Symlink to `docs-resources/images` so Antora can find shared images.
<6> 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?

Comment thread src/antora-structure.adoc
<5> Symlink to `docs-resources/images` so Antora can find shared images.
<6> All AsciiDoc source files live here.
<7> BibTeX bibliography file. Referenced by `spec-sample.adoc` via the `:bibtex-file:` attribute.
<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[]`.

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 ....

Comment thread src/antora-structure.adoc
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.

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?

Comment thread src/authoring.adoc Outdated
Bill Traynor (wmat) and others added 3 commits June 10, 2026 15:08
Signed-off-by: Bill Traynor wmat@riscv.org
Co-authored-by: Kersten Richter <kersten@riscv.org>
Signed-off-by: Bill Traynor <wmat@riscv.org>
Comment thread src/antora-structure.adoc
----
<1> Component name — used in Antora cross-references from other components (`xref:spec-sample:page.adoc[]`). Rename to match your specification.
<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.

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?

Comment thread src/antora-structure.adoc
<1> Component name — used in Antora cross-references from other components (`xref:spec-sample:page.adoc[]`). Rename to match your specification.
<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.
<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.

Comment thread src/antora-structure.adoc
<3> `~` means unversioned. Set to a version string (e.g., `1.0`) once the specification is released.
<4> Path to the navigation file, relative to `antora.yml`.

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

Comment thread src/antora-structure.adoc
[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.

Comment thread src/antora-structure.adoc

=== 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.

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.

Comment thread src/antora-structure.adoc

=== 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.

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.

Comment thread src/antora-structure.adoc

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.

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.

Comment thread local_build.md

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.


As an author of a document, there are some conventions to be aware of:

- The version, date, and state (draft, frozen, ratified) of the document should be specified in the `.adoc` file for that document via use of the `:revnumber:` and `:revremark:` keywords. An example usage is the following:

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.

and in the antora.yml file? not sure if we are using it that way though.

Comment thread src/authoring.adoc
[source,cmd]
----
asciidoctor book_header.adoc
make

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 get errors.

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.

and it crashes without finishing

Comment thread src/authoring.adoc
asciidoctor modules/ROOT/pages/spec-sample.adoc
----

Or more simply, using the Makefile:

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 even more simple to just let github build, as long as the repo is set up properly. Could we do that?

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.

Add instructions for Antora based spec template

2 participants