Set Up a Standard Page
A standard page has two parts, a header and a body.
The page header is a set of contiguous lines that start on the first line of the file. The header encapsulates the following elements:
= Page Title (1) :description: A description of the page stored in an HTML meta tag. (2) :sectanchors: (3) :url-repo: https://my-git-repo.com (4) :page-tags: name of a tag, name of a tag (5)
|1||Required page title entered on the first line of the file|
|3||Optional built-in AsciiDoc attribute|
|4||Optional custom AsciiDoc attribute|
|5||Optional custom Antora
The page title must be defined using an Atx-style (single line) document title that begins with a single equals sign. Antora does not recognize the legacy Setext-style (two line) document title syntax once supported by AsciiDoc. If you use the Setext-style syntax, xrefs in the page will not be resolved and other features of AsciiDoc will not be available.
The attribute entries, whether built-in or custom, must each be entered on its own line. The header can also contain comment lines.
The page header ends by entering one or more blank lines.
The page header is separated from the page body by at least one blank line. The next line that contains content initiates the body of the page.
= Page Title :description: A description of the page stored in an HTML meta tag. :sectanchors: :url-repo: https://my-git-repo.com :page-tags: name of a tag, name of a tag (1) This is the first line of the page body. (2) == Section heading This is a paragraph in a section.
|1||A blank line ends the page header.|
|2||After the blank line, the next line with content starts the body or the page.|
The first line of the page body can be any valid AsciiDoc content, such as a section heading, paragraph, table, include directive, image, etc.
A page is stored in a pages family directory.
The page’s filename is used to compute its URL.
If the filename begins with a dot (.) or ends without a file extension, Antora will ignore it.
If the filename starts with an underscore (
_), it will be added to the content catalog, but Antora won’t publish it.
Open a new file in your preferred IDE or plain text editor.
On the first line of the file, enter a page title. A page title is specified by one equals sign (
=), followed by one blank space, and then the text of the title.
= The Title of My New Page
The page title is the only required header element. Separate the header block from the body block by one blank line. Write your content.
= The Title of My New Page Welcome to my new page!
Save the file with the extension
.adocin a pages directory. The name you use when saving the file will be used to compute the page’s URL.
You’ve created a standard page! When you run Antora, it will be converted to an HTML page and published to your site automatically.
The page created in this example is simple. Using AsciiDoc, a page’s header can encompass a wide range of capabilities and its body can handle complex content.
Key Points to Remember
A page file: