From 4246d1bdba53697138a5ee14ca4e622a28c896b4 Mon Sep 17 00:00:00 2001 From: Sarah Emmett Date: Wed, 27 Aug 2025 10:51:14 -0400 Subject: [PATCH] Enforce required attributes and establish :keywords: as required --- home/modules/contribute/pages/attributes-and-roles.adoc | 4 +++- .../modules/contribute/partials/available-attributes.adoc | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/home/modules/contribute/pages/attributes-and-roles.adoc b/home/modules/contribute/pages/attributes-and-roles.adoc index ba7e53f6fb..a2923d613b 100644 --- a/home/modules/contribute/pages/attributes-and-roles.adoc +++ b/home/modules/contribute/pages/attributes-and-roles.adoc @@ -45,12 +45,14 @@ In this case, the tabs feature is turned on by setting `tabs`. <5> Reference an attribute in the body of the document by entering the attribute name inside a set of curly brackets (`+{attribute-name}+`). <6> Code blocks are assigned the source language `javascript`. -== Available Document Attributes +== Required Document Attributes The following document attributes must be included for every AsciiDoc file stored in a *pages* directory: include::partial$available-attributes.adoc[tag=required] +== Optional Document Attributes + You can also use the following optional attributes: include::partial$available-attributes.adoc[tag=optional] diff --git a/home/modules/contribute/partials/available-attributes.adoc b/home/modules/contribute/partials/available-attributes.adoc index 6fc85d792a..7450669d79 100644 --- a/home/modules/contribute/partials/available-attributes.adoc +++ b/home/modules/contribute/partials/available-attributes.adoc @@ -10,6 +10,10 @@ a| * For concepts: `concept` * For tasks: `guide` * For references: `reference` +| `:keywords:` +| Use the `keywords` attribute to add meta keywords to the HTML head for your page. +| Any applicable keyword, separated by commas (`,`). + | `:description:` | The page description is used for SEO and provides a brief description of the page, which is displayed using the `[abstract]` attribute on the page. a| Enter a quick description of the content on the page. @@ -38,10 +42,6 @@ a| `:imagesdir: ../assets/images` Try to keep your images inside the `assets/images` folder in a module. -| `:keywords:` -| Use the `keywords` attribute to add meta keywords to the HTML head for your page. -| Any applicable keyword, separated by commas (`,`). - | `:page-aliases:` a| Use the `page-aliases` attribute when you need to delete or rename a page to avoid breaking links. Antora will resolve any links to the filename(s) you specify in this attribute to redirect to the current page, instead.