Skip to content

Draft: Framework for Antora conversion. - #20

Open
oddhack wants to merge 12 commits into
mainfrom
antora
Open

oddhack wants to merge 12 commits into
mainfrom
antora

Conversation

@oddhack

@oddhack oddhack commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Staging area with current state of this PR is at https://staging-docs.vulkan.org/sandbox/spirv/spirv/latest/index.html . It just includes the SPIR-V specs, not the other components that are currently published, since it's just to evaluate the WIP conversion.

The generated HTML from the asciidoctor builds via 'make clean html' at top level is identical.

Adds conversion scripts from Vulkan to rewrite asciidoc <<>>-style xrefs to Antora xref:-style, and supporting Antora framework.

Adds Makefile setup_antora and clean_antora targets which rewrite SPIRV spec sources into antora/ using the scripts.

Refactors SPIR-V spec files, including the generator tools/spirv/printSpec.cpp that creates binary.adoc, slightly so the script can determine which files are top-level Antora 'pages' and which are just included 'partials'. Also modifies bin/process_versions.py to just emit the version text, and folds the other (static) asciidoc header material into intro.adoc, for the same reason.

Known issues TBD before ready for deployment:

  • Fixes for some xrefs that are not converting correctly yet
  • Incorporation into the Vulkan-Site repository build that generates docs.vulkan.org (Draft: Add SPIR-V Specification to the docs site Vulkan-Site#243)
  • Fix heading material (author information, mostly) on the extended instruction set specifications that are included in the site

The generated HTML from 'make clean html' at top level is identical.

Adds conversion scripts from Vulkan to rewrite asciidoc <<>>-style xrefs
to Antora xref:-style, and supporting Antora framework.

Adds Makefile setup_antora and clean_antora targets which rewrite SPIRV
spec sources into antora/ using the scripts.

Refactors SPIR-V spec files, including the generator
tools/spirv/printSpec.cpp that creates binary.adoc, slightly so the
script can determine which files are top-level Antora 'pages' and which
are just included 'partials'. Also modifies bin/process_versions.py to
just emit the version text, and folds the other (static) asciidoc header
material into intro.adoc, for the same reason.

This is the first stage of conversion, to be followed by cleanups,
navigation generation, fixes for some xrefs that are not converting
correctly yet, and incorporation into the Vulkan-Site repository build
that generates docs.vulkan.org.
Improve Antora conversion scripts and Makefile targets.
Add support for binary images and examples.
Add component index.adoc and a static nav.adoc for the different specifications.
Each chapter file now starts with a top-level ('= ') header, which
allows Antora to consume it as a separate page, and the other section
headings in those files have been adjusted accordingly. The generator
has been adjusted to do this for binary.adoc as well.

SPIRV.adoc globally moves the section headings down one level on
including the chapter files, so the generated asciidoctor outputs are
unaffected.

The 'clean' target has been split with 'clean_docs', which just removes
the generated HTML and PDF targets but not the generated intermediate
files.
@oddhack
oddhack requested a review from dnovillo November 20, 2026 05:40
@dnovillo

Copy link
Copy Markdown
Collaborator

Thanks, Jon. The sandbox reads well. A few things I found:

  • clean_antora only echoes the rm -rf.
  • .gitignore does not cover specs/generated/ or the files setup_antora writes under specs/antora/modules/ROOT/.
  • Some nits:
    • The Makefile comments still mention VUIDs, validusage and refpages.
    • $(JSAPIMAP) is undefined.
    • s/commited/committed/.

* Clean up clean_antora target
* Remove Vulkan-specific generated files and comments from Makefile, fix typos
* Add intermediate / generated files to .gitignore
they result in ToC inline with the page content.

Fix dependencies in Makefile so setup_antora target works correctly
after a 'make clean' without needing to build the asciidoctor targets
first.

Move pageHeaders to the beginning of rewritten files, instead of after
the chapter / document title, so they do not result in rendering author
/ revision information as random text. Vulkan-Site will need to be
modified to include this as metadata and/or in the UI template if this
information is needed in the generated site.
@oddhack

oddhack commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

Thanks, Jon. The sandbox reads well. A few things I found:

  • clean_antora only echoes the rm -rf.

  • .gitignore does not cover specs/generated/ or the files setup_antora writes under specs/antora/modules/ROOT/.

  • Some nits:

    • The Makefile comments still mention VUIDs, validusage and refpages.
    • $(JSAPIMAP) is undefined.
    • s/commited/committed/.

I think these have all been dealt with now.

which do not start with level 0 headings, if they are appropriately
tagged.
Appropriately tag the SPIR-V specification chapter files.
Modify the {image} path used in the Antora build to reflect updates to
the conversion script.
as a separate page.
Will need additional effort if the content in the document header
(contributor list, primarily) is to appear in the Antora build.
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.

2 participants