diff options
| author | Shulhan <ms@kilabit.info> | 2025-04-18 19:35:03 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2025-04-18 19:35:03 +0700 |
| commit | 7aef4c19dd9b4b9da2460e22395b6a25a476100f (patch) | |
| tree | ae5ab80fc8b85d1dba18f9aad343dda1836d1abd /document_attribute.go | |
| parent | 984b3b2c912616de5d8c2de766d4897c255d563e (diff) | |
| download | asciidoctor-go-7aef4c19dd9b4b9da2460e22395b6a25a476100f.tar.xz | |
all: fix the logic when applying default embedded CSS
By default, the document contains ":stylesheet:" attribute, which
means using the default embedded CSS.
To disable it, unset the attribute using ":stylesheet!:".
To overwrite it, set the attribute to path of CSS file
":stylesheet: my.css".
While at it, export the DocAttrStylesheet.
Diffstat (limited to 'document_attribute.go')
| -rw-r--r-- | document_attribute.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/document_attribute.go b/document_attribute.go index 9419084..3217c16 100644 --- a/document_attribute.go +++ b/document_attribute.go @@ -11,6 +11,13 @@ const ( DocAttrGenerator = `generator` DocAttrKeywords = `keywords` + // By default, the document contains ":stylesheet:" attribute, which + // means using the default embedded CSS. + // To disable it, unset the attribute using ":stylesheet!:". + // To overwrite it, set the attribute to path of CSS file + // ":stylesheet: my.css". + DocAttrStylesheet = `stylesheet` + docAttrAuthorInitials = `authorinitials` docAttrDocdir = `docdir` docAttrDocTitle = `doctitle` @@ -36,7 +43,6 @@ const ( docAttrSectNumLevel = `sectnumlevels` docAttrSectNums = `sectnums` docAttrShowTitle = `showtitle` - docAttrStylesheet = `stylesheet` docAttrTOC = `toc` docAttrTOCLevels = `toclevels` docAttrTOCTitle = `toc-title` @@ -70,7 +76,7 @@ func newDocumentAttribute() DocumentAttribute { docAttrLastUpdateValue: ``, docAttrSectIDs: ``, docAttrShowTitle: ``, - docAttrStylesheet: ``, + DocAttrStylesheet: ``, // Default to embedded CSS. docAttrTableCaption: ``, docAttrVersionLabel: ``, }, |
