mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-26 08:18:53 +00:00
Add shortcode from live site for readfile example in local files template
This commit is contained in:
@@ -41,7 +41,7 @@ So, let's create a new shortcode using `readDir`:
|
||||
**layouts/shortcodes/directoryindex.html**
|
||||
|
||||
```html
|
||||
{{</* readfile "layouts/shortcodes/directoryindex.html" */>}}
|
||||
{{< readfile "layouts/shortcodes/directoryindex.html" >}}
|
||||
```
|
||||
|
||||
For the files in any given directory, this shortcode usefully lists their basenames and sizes, while providing links to them.
|
||||
|
||||
Reference in New Issue
Block a user