Attributes

Setting document attributes

AsciiDoc attributes are optional key-value pairs that can be used to hold names, URLs, and reusable content phrases. Some attributes are built-in to AsciiDoc and Antora; others are defined specifically for the PAMMS site, a program, or by the writer.

When defined in the document header, these attributes become available to the whole document and all the includes inserted into that document. That means they can be referenced in the policy document.

Each attribute must be entered on a separate line, known as an attribute entry. The syntax of an attribute entry as follows:

:name: value

In this case, name is the name of the attribute and value is the optional value. You can see an example of an attribute entry in the document header below.

Document attribute in the header of the document
= 3210 Categorical Eligibility
:chapter-number: 3200 (1)
1 This is a document attribute. Its attribute name is chapter-number; its value, in this example, is 3200.

Common document attributes

There are a number of document attributes set in the header of most DFCS policy documents. These attributes were created from information in the running header and footer, as well as the table present at the beginning of each policy, during the migration process. Each attribute is described below:

Common document attributes present in a DFCS policy document
= 3210 Categorical Eligibility
:chapter-number: 3200 (1)
:effective-date: June 2023 (2)
:mt: MT-72 (3)
:policy-number: 3210 (4)
:policy-title: Categorical Eligibility (5)
:previous-policy-number: MT-69 (6)
(7)
include::partial$policy-header.adoc[] (8)

== Requirements

Households in which ALL assistance unit (AU) members receive TANF, Work Support Payments (WSP), or Supplemental Security Income (SSI) are categorically eligible to receive Food Stamp benefits.
1 The attribute named chapter-number specifies the chapter or appendix the document belongs to. In this example, its value is 3200. This attribute is referenced in the policy-header.adoc partial that is inserted into the document when the site is built.
2 The attribute named effective-date specifies the date from which the policy became effective. The value of this attribute should be updated when the policy has been officially reviewed or edited.
3 The attribute named mt specifies the manual transmission (MT) in which the policy was last updated. The value of this attribute should be updated when the policy has been officially updated as part of a new manual transmission. The value of this attribute may be empty in some document headers because there was no value in the original document that was migrated. Do not delete the attribute if its value is empty. If you delete it, an error will occur in the policy header table. If manual transmissions don’t apply to your policies, you won’t see this attribute in the header of your document.
4 The attribute named policy-number specifies the number of the policy.
5 The attribute named policy-title specifies the title of the policy that is displayed in the table at the beginning of the policy published on the PAMMS site.
6 The attribute named previous-policy-number specifies the previous MT the policy number of one or more policies the current policy replaced The value of this attribute should be updated when the policy has been updated as part of a new manual transmission (if manual transmissions apply to your policies). The value of this attribute may be empty in some document headers because there was no value in the original document that was migrated. Do not delete the attribute if its value is empty. If you delete it, an error will occur in the policy header table.
7 The document header ends with a blank line. This blank line tells the software that the lines following this blank line should be treated as the body of the policy document.
8 This is an include directive that inserts the contents of the policy-header.adoc file as the first content on the page, following the policy title. The policy-header.adoc file is a table presenting the key information about each policy. Most, if not all, of the document attributes described in this example are referenced by this table. The software uses the document attributes in the header of each policy to populate the cells in the table that reference the attributes when the site is built.

Unsetting a document attribute

Some built-in attributes are set (turned on) by default and set for all documents that are collected by Antora as specified in the playbook.

For example, section IDs are automatically generated for all policy pages. This occurs because the sectids attribute is turned on by default. To unset (turn off) an attribute on a page, prefix the name with a bang (!).

= Page Title
:!sectids: (1)
1 Unset sectids with a ! so that sections IDs are not generated from the section titles in the document.

See the production Antora playbook to review which AsciiDoc attributes are currently set and unset for all PAMMS pages.