#24 asciidoc-fedora: Update partials docs for Antora 2.0
Merged 3 years ago by pbokoc. Opened 3 years ago by jflory7.

@@ -1,4 +1,4 @@ 

- include::{partialsdir}/attributes.adoc[]

+ include::ROOT:partial$attributes.adoc[]

  

  = Fedora Docs

  

@@ -30,17 +30,18 @@ 

  [[attributes-file]]

  == Create attributes file

  

- First, initialize an attributes file for a specific module, as shown below:

+ First, initialize an `attributes.adoc` file for any module.

+ The example below shows a globally reusable attributes file in the `ROOT` module:

  

  [source,sh]

  ----

  .

  └── ROOT

      ├── nav.adoc

-     └── pages

-         ├── index.adoc

-         └── _partials

-             └── attributes.adoc

+     ├── pages

+     │   └── index.adoc

+     └── partials

+         └── attributes.adoc

  ----

  

  This is an example `attributes.adoc` from the xref:diversity-inclusion::index.adoc[Fedora Diversity & Inclusion Team]:
@@ -64,7 +65,7 @@ 

  

  [source,adoc]

  ----

- \include::{partialsdir}/attributes.adoc[]

+ \include::ROOT:partial$attributes.adoc[]

  ----

  

  

This commit refactors the documentation on how to use reusable
attributes. Recently I needed to create reusable attributes in a docs
project with multiple modules (a.k.a. this repo). So, while digging, I
discovered that the way I learned to include partials is deprecated
since Antora 1.1. The current stable version is 2.3.4 and an early alpha
is released for v3.0.0.

So, this is a slight modernization to make sure we are giving people the
right advice to set up their partials in a way that will continue to
work in future versions of Antora. Hurrah!

References:

Metadata Update from @jflory7:
- Pull-request tagged with: type - existing docs

3 years ago

Looks good, thanks!

We should also update the tempate to use the correct directory for partials; I'll get right on it.

(Oh wait, it doesn't have one at all. Never mind :)

Pull-Request has been merged by pbokoc

3 years ago