add include shortcode and doc
This commit is contained in:
parent
daa0d0744b
commit
5486f711f7
4 changed files with 77 additions and 0 deletions
8
layouts/shortcodes/include.html
Normal file
8
layouts/shortcodes/include.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
{{$file := .Get "file"}}
|
||||
{{- if eq (.Get "markdown") "true" -}}
|
||||
{{- $file | readFile | markdownify -}}
|
||||
{{- else if (.Get "language") -}}
|
||||
{{- highlight ($file | readFile) (.Get "language") (default "linenos=table" (.Get "options")) -}}
|
||||
{{- else -}}
|
||||
{{ $file | readFile | safeHTML }}
|
||||
{{- end -}}
|
Loading…
Add table
Add a link
Reference in a new issue