asciidoc-parser 0.19.0

Parser for AsciiDoc format
Documentation
use crate::tests::prelude::*;

track_file!("ref/asciidoc-lang/docs/modules/document/pages/metadata.adoc");

// Treating the entire file as non-normative because asciidoc-parser doesn't
// _consume_ the document metadata entries anywhere. There's nothing special
// about this syntax that we need to verify.
non_normative!(
    r#"
= Document Metadata

Document metadata, such as a description of the document, keywords, and custom information, can be assigned to attributes in the header.
When converted to HTML, the values of these attributes will correspond to elements contained in the `<head>` section of an HTML document.

[#description]
== Description

You can include a description of the document using the `description` attribute.

[source]
----
include::example$metadata.adoc[tag=desc-base]
----
<.> If the document's description is long, you can break the attribute's value across several lines by ending each line with a backslash `\` that is preceded by a space.

When converted to HTML, the document description value is assigned to the HTML `<meta>` element.

.HTML output
include::example$metadata.adoc[tag=desc-html]

// TODO: Add attribute continuation documentation to attributes section

[#keywords]
== Keywords

The `keywords` attribute contains a list of comma separated values that are assigned to the HTML `<meta>` element.

[source]
----
include::example$metadata.adoc[tag=key-base]
----

.HTML output
include::example$metadata.adoc[tag=key-html]

== Custom metadata, styles, and functions

You can add content, such as custom metadata, stylesheet, and script information, to the header of the output document using docinfo (document information) files.
The xref:docinfo:index.adoc[docinfo file] section details what these files can contain and how to use them.
"#
);