diff --git a/content/posts/hello-world.md b/content/posts/hello-world.md index 3af908b..805eb07 100644 --- a/content/posts/hello-world.md +++ b/content/posts/hello-world.md @@ -39,3 +39,11 @@ echo hello world | cut -d' ' -f 1 \draw (0,0) circle (1in); \end{tikzpicture} {{% /tikz %}} + +### Spoilers + +{{% spoiler "Don't open me" %}} +Test 2 + +Test 3 +{{% /spoiler %}} diff --git a/layouts/shortcodes/spoiler.html b/layouts/shortcodes/spoiler.html new file mode 100644 index 0000000..1a959ee --- /dev/null +++ b/layouts/shortcodes/spoiler.html @@ -0,0 +1,5 @@ +{{- $title := .Get "title" | default (.Get 0) -}} +
+ {{ $title }} +

{{.Inner}}

+