Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pandoc doc #9087

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion docs/content/en/content-management/formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Hugo passes reasonable default arguments to these external helpers by default:

- `asciidoctor`: `--no-header-footer -`
- `rst2html`: `--leave-comments --initial-header-level=2`
- `pandoc`: `--mathjax`
- `pandoc`: `--mathjax --toc -s --quiet`

{{% warning "Performance of External Helpers" %}}
Because additional formats are external commands, generation performance will rely heavily on the performance of the external tool you are using. As this feature is still in its infancy, feedback is welcome.
Expand Down Expand Up @@ -120,6 +120,12 @@ parameters. Run Hugo with `-v`. You will get an output like
INFO 2019/12/22 09:08:48 Rendering book-as-pdf.adoc with C:\Ruby26-x64\bin\asciidoctor.bat using asciidoc args [--no-header-footer -r asciidoctor-html5s -b html5s -r asciidoctor-diagram --base-dir D:\prototypes\hugo_asciidoc_ddd\docs -a outdir=D:\prototypes\hugo_asciidoc_ddd\build -] ...
```

### External Helper pandoc
preserveTOC
: By default, Hugo removes the table of contents generated by pandoc and provides it through the built-in variable [`.TableOfContents`](/content-management/toc/) to enable further customization and better integration with the various Hugo themes. This option can be set to `true` to preserve pandoc's TOC in the generated page.

{{< code-toggle config="markup.pandoc" />}}

## Learn Markdown

Markdown syntax is simple enough to learn in a single sitting. The following are excellent resources to get you up and running:
Expand Down
3 changes: 3 additions & 0 deletions docs/data/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1668,6 +1668,9 @@
"failureLevel": "fatal",
"workingFolderCurrent": false,
"preserveTOC": false
},
"pandoc": {
"preserveTOC": false
}
},
"mergeStrategy": {
Expand Down