Include

Last Edit: 2026-06-09

Include raw file contents on a page.

Include the contents of a file. Will markdownify it if detected to be a markdown file.

Usage

Partial

{{ partial "include" "/example.txt" }}

Shortcode

{{< include "/example.txt" >}}

Example

{{ partial "include" "/example.txt" }}
{{< include "/test/test.txt" >}}
*Hello* **World**, ~from~ `assets/test/test.txt`
{{ partial "include" "/example.md" }}
{{< include "/test/test.md" >}}
Hello World, from assets/test/test.md

References

1 2 3


  1. The Hugo Authors. “Content .” 2026. ↩︎

  2. The Hugo Authors. “Path .” 2026. ↩︎

  3. The Hugo Authors. “Transform .” 2026. ↩︎