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

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

= The Intrepid Chronicles
Kismet Lee; Lazarus Draeke
:description: A story chronicling the inexplicable \ (1)
hazards and unique challenges a team must vanquish \
on their journey to finding an open source \
project's true power.

This journey begins on a bleary Monday morning.
1 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.

Example 1. HTML output
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="generator" content="Asciidoctor 2.0.11">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="A story chronicling the inexplicable
hazards and unique challenges a team must vanquish on their journey
to finding an open source project's true power.">
<title>The Intrepid Chronicles</title>
<style>

Keywords

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

= The Intrepid Chronicles
Kismet Lee; Lazarus Draeke
:keywords: team, obstacles, journey, victory

This journey begins on a bleary Monday morning.
Example 2. HTML output
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="generator" content="Asciidoctor 2.0.11">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="keywords" content="team, obstacles, journey, victory">
<title>The Intrepid Chronicles</title>
<style>

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 docinfo file section details what these files can contain and how to use them.