-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Configure external helpers via output formats #6089
Comments
So your general idea is great. We should definitively connect the "content renderer" (let us worry about the terms (as used in the config struct) later, but the "helper" is not great).
Also, I'm not sure we can/would want to allow passing on arbitrary flags to helpers. We have no way to support everything and it has a lot of unknowns in the security department ( @kaushalmodi @regisphilibert and gang may chime in with their view on this topic. |
I'll go even though I might be missing something. Not sure how this would work? In the given example will Hugo load the pandoc Go Module itself? If so, how shall we install it? npm? |
@regis Hugo already supports Pandoc. |
@bep It might be an idea to use the suffix of the destination file to determine the output format for the renderer? In my example, since the destination has suffix ".tex", hugo can use pandoc as it supports TeX output. Eventually, one could specifically configure the renderer in the config file if the default doesn't suit. Also, I think the current approach of determining the renderer based on the suffix of the content file conflicts with the idea of separating "form" and "content". Determining the renderer/output format based on the output file makes more sense, in my opinion, supposing that all renderers support a similar markdown dialect. Finally, I think a layout file is still useful for other output formats apart from html. For LaTeX, it could contain something like \documentclass[12pt, a4]{article}
\usepackage[utf8]{inputenc}
\title{ {{ .Title }} }
\date{ {{ .Date }} }
\begin{document}
{{ .Content }}
\end{document} This would then be saved in a file like |
Hi,
The support of pandoc adds many options to possible output formats for Hugo. However, it is now limited to html output. I guess an incredible amount of flexibility would be added when external helpers, like pandoc, can be configured via the output formats configuration, e.g.
This would make for a hassle-free way to generate PDF versions of web pages.
Or is this beyond the scope of Hugo?
The text was updated successfully, but these errors were encountered: