Vulkan documentation transformation pipeline for VulkanHub
The transformation can be roughly split into three stages:
This is in main.ts
. We use Asciidoctor.js
to convert the official AsciiDocs into Markdown, in the @nuxtjs/mdc flavor.
We additionally need to grab some data from vk.xml
. This part was written in Rust due to the good work done in vk_parse. We grab those information from vk.xml
and put them in the Markdown frontmatter section.
This is also where we generate the source code sections for both C and Rust.
This is where we resolve cross links and turn the markdown files into JSON so that they can be consumed by the frontend without further parsing. The frontend uses Vue.js, so it expects the document tree to be in a vnode tree. @nuxtjs/mdc does this transformation for us.
Take a look at .github/workflows/build.yml
and follow those commands step by step.