about summary refs log tree commit diff
path: root/web/blog
diff options
context:
space:
mode:
Diffstat (limited to 'web/blog')
-rw-r--r--web/blog/default.nix4
-rw-r--r--web/blog/fragments.nix2
2 files changed, 5 insertions, 1 deletions
diff --git a/web/blog/default.nix b/web/blog/default.nix
index 66d7759deb7b..696a9529c3b4 100644
--- a/web/blog/default.nix
+++ b/web/blog/default.nix
@@ -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;
 
diff --git a/web/blog/fragments.nix b/web/blog/fragments.nix
index 8c78b2cc928b..20fb879d9e83 100644
--- a/web/blog/fragments.nix
+++ b/web/blog/fragments.nix
@@ -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