From a3f09559e465ea1255baf83345fc7fd1b2da62b3 Mon Sep 17 00:00:00 2001 From: Caio Lente <7017340+clente@users.noreply.github.com> Date: Fri, 27 Oct 2023 19:30:53 -0300 Subject: Conditional CSS --- layouts/shortcodes/highlight.html | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 layouts/shortcodes/highlight.html (limited to 'layouts/shortcodes/highlight.html') diff --git a/layouts/shortcodes/highlight.html b/layouts/shortcodes/highlight.html new file mode 100644 index 0000000..6c86ca8 --- /dev/null +++ b/layouts/shortcodes/highlight.html @@ -0,0 +1,5 @@ + +{{ .Page.Store.Set "hasCodeBlock" true }} + + +{{ if len .Params | eq 2 }}{{ highlight (trim .InnerDeindent "\n\r") (.Get 0) (.Get 1) }}{{ else }}{{ highlight (trim .InnerDeindent "\n\r") (.Get 0) "" }}{{ end }} \ No newline at end of file -- cgit v1.2.3