The official chat room for Antora is now located at https://antora.zulipchat.com. Please join us there!
build-preview-pages.js
to make it work. My guess is that a different file is used during the build and this is why it fails
I think you have two problems:
build-preview-pages.js
sidesteps this.Normally you specify the layout as a page attribute :page-layout: swagger
I think you can have a page with just a top level title and that attribute. I would suggest also including the URL used by your js code as a page attribute :page-swagger-url: https://testnet.lisk.io/api/spec
, you can reference it in the .hbs with {{page.attributes.swagger-url}}
You could also consider writing an asciidoctor extension to generate the page statically at build time, so the site doesn't need to access that URL.
.adoc
file with just title and :page-layout: swagger
and as I added this layout to UI before, it immediately worked: https://liskhq.github.io/lisk-docs/lisk-core/api.html#/Accounts/getAccounts :D
dir
field under output
). Then, all you'd need to do is add a link in your UI to that page, doing something like <a href="{{uiRootPath}}/../path/to/swagger.html">Swagger</a>
. Specifically, if your Antora-generated HTML is in a folder called build
, and you place swagger.html
at the root of build
, then that link would be <a href="{{uiRootPath}}/../swagger.html">Swagger</a>
.
commonAttachmentsDir: /shared/1.0/attachments
and link:{commonAttachmentsDir}/foo/bar/my.pdf
I have no idea if this will actually work though...
{attributesdir}
.link:Shared:Settings:{attributesdir}/Setting.pdf[link text]
link:Settings:{attributesdir}/Setting.pdf[link text]
link:{attributesdir}/Setting.pdf[link text]
link
macro doesn't understand Antora's component ids as used in the xref
macro. I think that this is the relevant issue: antora/antora#180
site-pr.yml
files within the master documentation build project, but the bigger issue is, that PRs usually would be triggered from "downstream" projects where the actual content lies, potentially even from multiple ones.
@gmarpons I didn’t consider that perhaps the reason why the solution you proposed isn’t working for me is because of a version incompatibility. We are currently still running Antora 2.0
@jaredmorgs Yes, I think you need at least version 2.1. The functionality added in this issue is relevant to my experiment: antora/antora#430.