aboutsummaryrefslogtreecommitdiff
path: root/document_attribute.go
diff options
context:
space:
mode:
Diffstat (limited to 'document_attribute.go')
-rw-r--r--document_attribute.go63
1 files changed, 56 insertions, 7 deletions
diff --git a/document_attribute.go b/document_attribute.go
index c7b2c83..31dbb50 100644
--- a/document_attribute.go
+++ b/document_attribute.go
@@ -5,19 +5,68 @@ package asciidoctor
import "strings"
+// List of document attribute.
+const (
+ DocAttrAuthor = `author` // May contain the first author full name only.
+ DocAttrAuthorNames = `author_names` // List of author full names, separated by comma.
+ DocAttrDescription = `description`
+ DocAttrGenerator = `generator`
+ DocAttrKeywords = `keywords`
+
+ docAttrAuthorInitials = `authorinitials`
+ docAttrDocTitle = `doctitle`
+ docAttrEmail = attrValueEmail
+ docAttrFirstName = `firstname`
+ docAttrIDPrefix = `idprefix`
+ docAttrIDSeparator = `idseparator`
+ docAttrLastName = `lastname`
+ docAttrLastUpdateLabel = `last-update-label`
+ docAttrLastUpdateValue = `last-update-value`
+ docAttrMiddleName = `middlename`
+ docAttrNoFooter = `nofooter`
+ docAttrNoHeader = `noheader`
+ docAttrNoHeaderFooter = `no-header-footer`
+ docAttrNoTitle = `notitle`
+ docAttrRevDate = `revdate`
+ docAttrRevNumber = `revnumber`
+ docAttrRevRemark = `revremark`
+ docAttrSectAnchors = `sectanchors`
+ docAttrSectIDs = `sectids`
+ docAttrSectLinks = `sectlinks`
+ docAttrSectNumLevel = `sectnumlevels`
+ docAttrSectNums = `sectnums`
+ docAttrShowTitle = `showtitle`
+ docAttrTOC = `toc`
+ docAttrTOCLevels = `toclevels`
+ docAttrTOCTitle = `toc-title`
+ docAttrTableCaption = `table-caption`
+ docAttrTitle = attrNameTitle
+ docAttrTitleSeparator = `title-separator`
+ docAttrVersionLabel = `version-label`
+)
+
+// List of possible document attribute value.
+const (
+ docAttrValueAuto = `auto`
+ docAttrValueMacro = `macro`
+ docAttrValuePreamble = `preamble`
+ docAttrValueLeft = `left`
+ docAttrValueRight = `right`
+)
+
// DocumentAttribute contains the mapping of global attribute keys in the
// headers with its value.
type DocumentAttribute map[string]string
func newDocumentAttribute() DocumentAttribute {
return DocumentAttribute{
- MetaNameGenerator: `asciidoctor-go ` + Version,
- metaNameLastUpdateLabel: `Last updated`,
- metaNameLastUpdateValue: ``,
- metaNameSectIDs: ``,
- metaNameShowTitle: ``,
- metaNameTableCaption: ``,
- metaNameVersionLabel: ``,
+ DocAttrGenerator: `asciidoctor-go ` + Version,
+ docAttrLastUpdateLabel: `Last updated`,
+ docAttrLastUpdateValue: ``,
+ docAttrSectIDs: ``,
+ docAttrShowTitle: ``,
+ docAttrTableCaption: ``,
+ docAttrVersionLabel: ``,
}
}