summaryrefslogtreecommitdiff
path: root/themes/itheme/layouts/_default/_markup/render-codeblock.html
diff options
context:
space:
mode:
Diffstat (limited to 'themes/itheme/layouts/_default/_markup/render-codeblock.html')
-rw-r--r--themes/itheme/layouts/_default/_markup/render-codeblock.html9
1 files changed, 9 insertions, 0 deletions
diff --git a/themes/itheme/layouts/_default/_markup/render-codeblock.html b/themes/itheme/layouts/_default/_markup/render-codeblock.html
new file mode 100644
index 0000000..a39190c
--- /dev/null
+++ b/themes/itheme/layouts/_default/_markup/render-codeblock.html
@@ -0,0 +1,9 @@
+<div class="component-content pagebody component code">
+ {{ $class := .Attributes.class | default "" }}
+ {{ $lang := .Attributes.lang | default .Type }}
+ {{ if transform.CanHighlight $lang }}
+ <div class="{{ $class }}">{{ highlight .Inner $lang }}</div>
+ {{else}}
+ <pre><code class="{{ $class }}">{{.Inner}}</code></pre>
+ {{end}}
+</div> \ No newline at end of file