-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Description
Currently, with Pandoc and reStructuredText markup, if the external converter is not installed we print an informative statement to stdout and continue the build:
Lines 61 to 65 in 0de8f86
| if binaryName == "" { | |
| logger.Println("pandoc not found in $PATH: Please install.\n", | |
| " Leaving pandoc content unrendered.") | |
| return src, nil | |
| } |
Lines 67 to 70 in 0de8f86
| if binaryName == "" { | |
| logger.Println("rst2html / rst2html.py not found in $PATH: Please install.\n", | |
| " Leaving reStructuredText content unrendered.") | |
| return src, nil |
But with AsciiDoc content we fail the build:
hugo/markup/asciidocext/internal/converter.go
Lines 90 to 93 in 0de8f86
| if ok, err := HasAsciiDoc(); !ok { | |
| a.Cfg.Logger.Errorf("leaving AsciiDoc content unrendered: %s", err.Error()) | |
| return src, nil | |
| } |
This isn't anything new; it's been like this for a few years at least.
From a data integrity standpoint, it seems like we should also fail the build for Pandoc and reStructuredText. With automated deployments in particular, you have no idea if you are publishing raw content unless you look at the build log... which in practice doesn't happen unless there's an error.
If we do this:
- We should include the page
Path(if available) in the error message. - We need to modify
TestPagesFromGoTmplAsciiDocAndSimilarto perform the "Supports" checks before the build.