Add shortcode to read files
This commit is contained in:
parent
21ee97eebf
commit
1d1010b212
2 changed files with 9 additions and 1 deletions
|
@ -1 +1,5 @@
|
||||||
# Snippets
|
---
|
||||||
|
title: Snippets
|
||||||
|
---
|
||||||
|
|
||||||
|
{{% read_file "README.md" %}}
|
||||||
|
|
4
layouts/shortcodes/read_file.html
Normal file
4
layouts/shortcodes/read_file.html
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{{ $file := resources.Get (.Get 0) }}
|
||||||
|
|
||||||
|
|
||||||
|
{{ $file.Content | safeHTML }}
|
Reference in a new issue