153 add instructions for antora based spec template#154
153 add instructions for antora based spec template#154Bill Traynor (wmat) wants to merge 14 commits into
Conversation
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>
…https://github.com/riscv/docs-dev-guide into 153-add-instructions-for-antora-based-spec-template
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>
| spec-sample.adoc | ||
| intro.adoc | ||
| chapter2.adoc | ||
| ... |
There was a problem hiding this comment.
add resources for bibliographies?
There was a problem hiding this comment.
Also partials? I know I know - not many have wavedrom files. but still....
There was a problem hiding this comment.
Yep, added that in with my last push.
| chapter2.adoc | ||
| ... | ||
| ---- | ||
| <1> Antora component descriptor — identifies this repo as an Antora component. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Expanded a bit with my last push.
Signed-off-by: Bill Traynor wmat@riscv.org
| 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. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
From Antora's POV the antora.yml is what makes it a component to be targetted. However, Make is still the way to build.
| <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. |
There was a problem hiding this comment.
it is? I also put shared images into the common assets folder in antora-dev.riscv.org
There was a problem hiding this comment.
I thought you also put any graphics for the topic in here.
There was a problem hiding this comment.
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.
| ---- | ||
| <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. |
There was a problem hiding this comment.
docs-resources - Git submodule....
There was a problem hiding this comment.
Not sure I understand what you mean.
| ... | ||
| partials/ <8> | ||
| ---- | ||
| <1> Antora component descriptor — identifies this repo as an Antora component and provides component metadata and configuration. |
There was a problem hiding this comment.
antora.yml - An antora component descriptor that identifies ...
| <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. |
There was a problem hiding this comment.
nav.adoc - The navigation file that defines....
| <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. |
There was a problem hiding this comment.
Pages directory - all AsciiDoc source files live here.
| <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. |
There was a problem hiding this comment.
doesn't this go in resources folder?
| <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[]`. |
There was a problem hiding this comment.
partials - optional directory ....
| 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. |
There was a problem hiding this comment.
also becomes the name in the URL so be specific.
There was a problem hiding this comment.
plus match what? I'm not sure what they are matching to?
Signed-off-by: Bill Traynor wmat@riscv.org
…ttps://github.com/riscv/docs-dev-guide into 153-add-instructions-for-antora-based-spec-template
Co-authored-by: Kersten Richter <kersten@riscv.org> Signed-off-by: Bill Traynor <wmat@riscv.org>
| ---- | ||
| <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. |
There was a problem hiding this comment.
they should be using some sort of version here though?
| <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`. |
There was a problem hiding this comment.
if they use the correct set up, this should always be the same.
| <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. |
There was a problem hiding this comment.
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
| [source,adoc] | ||
| ---- | ||
| * xref:spec-sample.adoc[RISC-V Example Specification] | ||
| ** xref:intro.adoc[Introduction] |
There was a problem hiding this comment.
very few of them actually nest. We just made them flat.
|
|
||
| === 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. |
There was a problem hiding this comment.
sidebar is confusing because that makes me think of the right nav, which is controlled by the headings on the page.
|
|
||
| === 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. |
There was a problem hiding this comment.
I don't think this is true.
|
|
||
| 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/`. |
There was a problem hiding this comment.
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.
|
|
||
| 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 |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
and in the antora.yml file? not sure if we are using it that way though.
| [source,cmd] | ||
| ---- | ||
| asciidoctor book_header.adoc | ||
| make |
There was a problem hiding this comment.
I get errors.
There was a problem hiding this comment.
and it crashes without finishing
| asciidoctor modules/ROOT/pages/spec-sample.adoc | ||
| ---- | ||
|
|
||
| Or more simply, using the Makefile: |
There was a problem hiding this comment.
it is even more simple to just let github build, as long as the repo is set up properly. Could we do that?
No description provided.