Currently supported output formats for local_file:
md
html
pdf
Changes on specs:
No separate stdout plugin publisher. By default render cli command prints to stdout.
Adding --publish flag triggers all publish blocks defined in fabric template. Returns an error if there is no publish block defined for document.
--format instead of --publish-format. --format overrides default output format. If format is defined in the fabric template, then it uses the one from template.
format instead of doc_format in publish block arguments.
No duplicate format_ext in data context since it already matches format.
By default html<title> is from frontmatter as described in specs, but if not found then the first title from the content is used. If document has no title elements, then Untitled is used.
Incomplete:
Frontmatter css_classes are quite tricky to implement for html output format. I started working on this but it requires writing custom goldmark renderer which was quite buggy on first iteration, so I removed this functionality for now. css_code, css_sources and all other html properties from frontmatter works fine.
Implemented:
126
117
Currently supported output formats for
local_file
:md
html
pdf
Changes on specs:
stdout
plugin publisher. By defaultrender
cli command prints tostdout
.--publish
flag triggers allpublish
blocks defined in fabric template. Returns an error if there is nopublish
block defined for document.--format
instead of--publish-format
.--format
overrides default output format. Ifformat
is defined in the fabric template, then it uses the one from template.format
instead ofdoc_format
inpublish
block arguments.format_ext
in data context since it already matchesformat
.html
<title>
is fromfrontmatter
as described in specs, but if not found then the firsttitle
from the content is used. If document has notitle
elements, thenUntitled
is used.Incomplete:
css_classes
are quite tricky to implement forhtml
output format. I started working on this but it requires writing custom goldmark renderer which was quite buggy on first iteration, so I removed this functionality for now.css_code
,css_sources
and all other html properties from frontmatter works fine.Example using
publish
:https://github.com/blackstork-io/fabric/blob/4ee0fa19da4aaa8fac4c4f39aed8aa80531f792b/examples/templates/publish/example.fabric