feat(web/blog): add option to disable tagfilter per-post
Posts can now specify (optionally) tagfilter=true/false to toggle escaping of HTML tags. Change-Id: Ie4a1a45028570fc166fdffba708bf9d0e0c6ae81 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9277 Tested-by: BuildkiteCI Reviewed-by: Mark Shevchenko <markshevchenko@gmail.com>
This commit is contained in:
parent
c5770e65dd
commit
a32730ab45
2 changed files with 5 additions and 1 deletions
|
@ -24,6 +24,10 @@ let
|
|||
# Path to the Markdown file containing the post content.
|
||||
content = path;
|
||||
|
||||
# Whether dangerous HTML tags should be filtered in this post. Can
|
||||
# be disabled to, for example, embed videos in a post.
|
||||
tagfilter = option bool;
|
||||
|
||||
# Optional name of the author to display.
|
||||
author = option string;
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ let
|
|||
}
|
||||
|
||||
# Write the actual post through cheddar's about-filter mechanism
|
||||
cat ${renderMarkdown post.content} >> $out
|
||||
cat ${renderMarkdown { path = post.content; tagfilter = post.tagfilter or true; }} >> $out
|
||||
echo '</article>' >> $out
|
||||
|
||||
cat ${writeText "footer.html" (fullFooter footer)} >> $out
|
||||
|
|
Loading…
Reference in a new issue