You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recognize the Pandoc format under the file extension .pandoc or .pdc,
and shell out to pandoc as an external helper to format Pandoc content.
Add a configuration option, externalHelperArguments, that can be used to
override the additional arguments passed to external helpers.
Refactor out repeated code with external helpers. Change the error
output formatting. I did not see any of the external helpers print the
string "<input>" to represent stdin as a file; just prepending the file
name to error output is more general and doesn't sacrifice that much in
terms of readability.
@@ -195,12 +195,33 @@ With this setup, everything is in place for a natural usage of MathJax on pages
195
195
196
196
## Additional Formats Through External Helpers
197
197
198
-
Hugo has new concept called _external helpers_. It means that you can write your content using [Asciidoc][ascii], [reStructuredText][rest]. If you have files with associated extensions, Hugo will call external commands to generate the content. ([See the Hugo source code for external helpers][helperssource].)
198
+
Hugo has a new concept called _external helpers_. It means that you can write your content using [Asciidoc][ascii], [reStructuredText][rest], or [pandoc]. If you have files with associated extensions, Hugo will call external commands to generate the content. ([See the Hugo source code for external helpers][helperssource].)
199
199
200
200
For example, for Asciidoc files, Hugo will try to call the `asciidoctor` or `asciidoc` command. This means that you will have to install the associated tool on your machine to be able to use these formats. ([See the Asciidoctor docs for installation instructions](http://asciidoctor.org/docs/install-toolchain/)).
201
201
202
202
To use these formats, just use the standard extension and the front matter exactly as you would do with natively supported `.md` files.
203
203
204
+
Hugo attempts to pass reasonable default arguments to these external helpers by default:
You can override these arguments by adding entries under the `externalHelperArguments` variable in your [site configuration][config]. For example, if you wanted to use `pandoc` to render your markup with the flag `--strip-comments`, you might put the following in `config.toml`:
212
+
213
+
```
214
+
[externalHelperArguments]
215
+
pandoc: --strip-comments
216
+
```
217
+
218
+
Or in `config.yaml`:
219
+
220
+
```
221
+
externalHelperArguments:
222
+
pandoc: --strip-comments
223
+
```
224
+
204
225
{{% warning "Performance of External Helpers" %}}
205
226
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.
206
227
{{% /warning %}}
@@ -235,6 +256,7 @@ Markdown syntax is simple enough to learn in a single sitting. The following are
0 commit comments