diff options
author | Lars Wirzenius <liw@liw.fi> | 2020-02-15 07:20:05 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2020-02-15 07:20:05 +0000 |
commit | 62df0717e7087a051ec697b59b21feefaa27ece7 (patch) | |
tree | 9e33c085db46629672b566bfd7712c002a2c6ed3 /subplot.md | |
parent | b0c3b2f3158611caf3f7bcc4ce8b277abde1e035 (diff) | |
parent | e975bd5b30eb7f3f46cba32e16ca813e110bc497 (diff) | |
download | subplot-62df0717e7087a051ec697b59b21feefaa27ece7.tar.gz |
Merge branch 'liw/titles' into 'master'
Change: require docgen, codegen to fail if document has no title
See merge request larswirzenius/subplot!2
Diffstat (limited to 'subplot.md')
-rw-r--r-- | subplot.md | 43 |
1 files changed, 43 insertions, 0 deletions
@@ -736,6 +736,49 @@ given precondition foo ~~~~ +### Document titles + +The document and code generators require a document title, because +it's a common user error to not have one, and Subplot should help make +good documents. The Pandoc filter, however, mustn't require a document +title, because it's used for things like formatting websites using +ikiwiki, and ikiwiki has a different way of specifying page titles. + +#### Document generator gives an error if input document lacks title + +~~~scenario +given file notitle.md +when I try to run sp-docgen notitle.md -o foo.md +then exit code is non-zero +~~~ + +~~~{.file #notitle.md .markdown .numberLines} +--- +bindings: b.yaml +functions: f.py +... + + +# Introduction + +This is a very simple Markdown file without a YAML metadata block, +and thus also no document title. + +```scenario +given precondition foo +when I do bar +then bar was done +~~~ + +#### Code generator gives an error if input document lacks title + +~~~scenario +given file notitle.md +when I try to run sp-codegen --run notitle.md -o test.py +then exit code is non-zero +~~~ + + Using a Pandoc filter ----------------------------------------------------------------------------- |