Fix Asciidoctor args

* Fix Asciidoctor args

* Fix Asciidoctor args documentation

* Update AsciiDoc documentation

Co-authored-by: Derk Muenchhausen <derk@muenchhausen.de>

Fixes #7493
This commit is contained in:
Helder Pereira
2020-07-23 14:59:48 +01:00
committed by GitHub
parent a06c06a5c2
commit 45c665d396
4 changed files with 108 additions and 39 deletions

View File

@@ -14,23 +14,28 @@
// Package asciidoc_config holds asciidoc related configuration.
package asciidocext_config
// DefaultConfig holds the default asciidoc configuration.
// These values are asciidoctor cli defaults (see https://asciidoctor.org/docs/user-manual/)
var (
// Default holds Hugo's default asciidoc configuration.
Default = Config{
Backend: "html5",
DocType: "article",
Extensions: []string{},
Attributes: map[string]string{},
NoHeaderOrFooter: true,
SafeMode: "unsafe",
SectionNumbers: false,
Verbose: true,
Trace: false,
Verbose: false,
Trace: true,
FailureLevel: "fatal",
WorkingFolderCurrent: false,
}
// CliDefault holds Asciidoctor CLI defaults (see https://asciidoctor.org/docs/user-manual/)
CliDefault = Config{
Backend: "html5",
SafeMode: "unsafe",
FailureLevel: "fatal",
}
AllowedExtensions = map[string]bool{
"asciidoctor-html5s": true,
"asciidoctor-bibtex": true,
@@ -72,7 +77,6 @@ var (
// Config configures asciidoc.
type Config struct {
Backend string
DocType string
Extensions []string
Attributes map[string]string
NoHeaderOrFooter bool