Skip to content

Commit a0246b6

Browse files
authored
docs: document some antora build details (#644)
* docs: document some antora build details * put each link in a page attribute * fix broken attribute ref * fix typo
1 parent 7901472 commit a0246b6

File tree

3 files changed

+43
-17
lines changed

3 files changed

+43
-17
lines changed

modules/contributor/pages/docs/overview.adoc

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,30 @@
22
:figure-caption!:
33
:antora-docs: https://docs.antora.org/antora/latest/
44
:antora-playbook: https://docs.antora.org/antora/latest/playbook/
5-
:netlify: https://www.netlify.com/
5+
:antora-zulipchat: https://antora.zulipchat.com/
6+
:antora-distributed-components: https://docs.antora.org/antora/latest/distributed-component-version/
7+
:antora-content-branches: https://docs.antora.org/antora/latest/playbook/content-branches/
8+
:crddocs-site: https://crds.stackable.tech/
69
:diataxis: https://diataxis.fr/
7-
:documentation: https://github.com/stackabletech/documentation
10+
:netlify: https://www.netlify.com/
11+
:pagefind: https://pagefind.app/
12+
:stackable-crddocs-repo: https://github.com/stackabletech/crddocs
13+
:stackable-docs-readme: https://github.com/stackabletech/documentation/blob/main/README.adoc
14+
:stackable-docs-repo: https://github.com/stackabletech/documentation
15+
:stackable-docs-ui-repo: https://github.com/stackabletech/documentation-ui
16+
:trunk-based-development: https://trunkbaseddevelopment.com/
817

918
We use {antora-docs}[Antora] to write our user facing documentation,
1019
{netlify}[Netlify] to host it and the {diataxis}[Diátaxis] framework as the guide for the structure of the content.
11-
The main repository for the documentation is the {documentation}[Documentation] repository and
20+
The main repository for the documentation is the {stackable-docs-repo}[Documentation] repository and
1221
each operator and other tools have a `docs` directory from which content is pulled in.
1322
Have a look at the xref:project-overview.adoc[] to learn about the repositories that are involved in providing the documentation.
1423

1524
== Content structure: Diátaxis
1625

1726
The {diataxis}[Diátaxis] framework is a way to classify documentation content into four groups with distinct use cases.
1827

19-
.Source: https://diataxis.fr/
28+
.Source: {diataxis}
2029
image::diataxis.png[]
2130

2231
Documentation exists along two axis: _study_ or _work_; _pracital steps_ and _theory_.
@@ -37,7 +46,7 @@ The guide has to account for different use-cases (i.e. the user is using their o
3746
Since this kind of information is typically product specific, it is located in the usage guide section of individual operators.
3847

3948
**Reference** information for the Stackable platform entails all the settings and Options in our YAMLs, which we generate.
40-
The reference is found at https://crds.stackable.tech/ and generated from the https://github.com/stackabletech/crddocs[crddocs repository].
49+
The reference is found at {crddocs-site} and generated from the {stackable-crddocs-repo}[crddocs repository].
4150

4251
=== Style guide
4352

@@ -46,16 +55,16 @@ The xref:docs/style-guide.adoc[] contains all the information about the writing
4655
== Technical bits: Antora, Netlify, Pagefind
4756

4857
{antora-docs}[Antora] uses a {antora-playbook}[playbook] to build the documentation.
49-
It pulls information from all the individual operators, so their documentation can live in the same repository.
58+
It pulls documentation content from all the individual operator repositories, so an operators documentation is maintained in the same repository as the code.
5059
Antora builds a static website which we serve over {netlify}[Netlify].
51-
The web template of the documentation is also custom made and is developed in the https://github.com/stackabletech/documentation-ui[documentation-ui] repository.
60+
The web template of the documentation is also custom made and is developed in the {stackable-docs-ui-repo}[documentation-ui] repository.
5261

53-
For search, we use https://pagefind.app/[pagefind] - a static search.
62+
For search, we use {pagefind}[pagefind] - a static search.
5463
The search index is generated as part of the build process and no external index is queried during search.
5564

56-
For Antora, the https://antora.zulipchat.com/[Antora Zulip chatroom] is a good place to get help (besides the documentation)!
65+
For Antora, the {antora-zulipchat}[Antora Zulip chatroom] is a good place to get help (besides the documentation)!
5766

58-
Building the documentation and also the deployment process on Netlify are documented in the https://github.com/stackabletech/documentation/blob/main/README.adoc[README] file of the documentation repository.
67+
Building the documentation and also the deployment process on Netlify are documented in the {stackable-docs-readme}[README] file of the documentation repository.
5968

6069
== Executable tutorials
6170

@@ -76,9 +85,15 @@ This is used for getting started scripts, and in there only for versions of oper
7685

7786
Without this templating mechanism, every release these values would need to be updated by hand (or possibly with a search and replace) with is error prone and time consuming.
7887

79-
== Branch and version structure
88+
== Branch, component and version structure
89+
90+
The documentation consists of two _components_, the `home` and `management` component.
91+
All documentation for the operators is in the `home` component, and it is versioned with the platform versions (23.11, 24.3, 24.7 etc.).
92+
The `management` component contains docs for `stackablectl` and the Stackable cockpit; it is not versioned (there is only a single, current version).
8093

81-
All Stackable repositories use https://trunkbaseddevelopment.com/[trunk based development], and so the documentation is also pulled from different release branches.
82-
This means that any changes from the `main` branch that should be published in other versions need to be cherry-picked over into that branch.
94+
The `home` component is actually a {antora-distributed-components}[distributed component], which means that it is split across multiple repositories.
95+
Each operator repository has a `docs` directory where the docs are found, and in there the `antora.yml` file specifies that the component is `home`, which means that the `home` component is partially defined across all operator repositories.
8396

84-
Antora recommends using https://docs.antora.org/antora/latest/playbook/content-branches/[branches] to organize different versions of components.
97+
For versions, all Stackable repositories use {trunk-based-development}[trunk based development], and so the documentation is also pulled from different release branches in each repository.
98+
Each branch contains only a single version, and the `main` branch contains the `nightly` docs version.
99+
Using branches to structure component version is also {antora-content-branches}[recommended by Antora].

modules/contributor/pages/docs/releasing-a-new-version.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ This process has been automated with scripts, which are found in the https://git
77

88
The process consists of two steps:
99

10-
. Making a new release branch (`make-release-branch.sh`)
11-
. Publishing the new version by modifying the playbooks (`publish-new-version.sh`)
10+
. Making a new release branch (`make-release-branch.sh`).
11+
. Publishing the new version by modifying the playbooks (`publish-new-version.sh`).
1212

1313
Consult the scripts for details about the required steps, as well as prerequisites.
14+
Furthermore the xref:docs/troubleshooting-antora.adoc[troubleshooting page] can be helpful to understand and fix Antora build errors.
Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
= Troubleshooting Antora build errors
2+
:antora-xref-docs: https://docs.antora.org/antora/latest/page/xref/
23

34
* Netlify build error: `Duplicate nav in nightly@home: modules/ROOT/nav.adoc`
45
** This probably means that there are two branches of the same repository defined in the Antora playbook, that have the same version set.
56
They both supply a `nav.adoc` file for the same component and version, and Antora doesn't know which one to pick.
6-
Make sure that the release branches have the correct version set in their `antora.yml` files and also make sure that the `main` branch is still set to `nightly`.
7+
Make sure that the release branches have the correct version set in their `antora.yml` files and also make sure that the `main` branch is still set to `nightly`.
8+
* An `xref` or `include` in the `home` component is not found (starting with `xref:home...`)
9+
** If the page containing the `xref` is also in the `home` component, do **not** include the component name in the `xref`.
10+
Read the {antora-xref-docs}[`xref` documentation].
11+
Creating a reference to a page and _specifying a component without a version_ means that the link is pointing to the latest version.
12+
This is usually not what you want!
13+
Omitting the component entirely will instead link to the target page _within the same version_ as the page resides in.
14+
* Other `xref` and `include` issues
15+
** Familiarize yourself with the {antora-xref-docs}[`xref` documentation] which explains the syntax in great detail.
16+
Unfortunately the xref syntax is a common place to make mistakes, and it is easy to accidently link to the wrong place.

0 commit comments

Comments
 (0)