The include shortcode includes other pages, resources or files from your project.


While the examples are using shortcodes with named parameter you are free to use positional as well or also call this shortcode from your own partials.

{{% include file="shortcodes/include/" %}}
{{% include "shortcodes/include/" %}}
{{ partial "shortcodes/include .html" (dict
  "page" .
  "file" "shortcodes/include/"

The included files can even contain Markdown and will be taken into account when generating the table of contents.


Name Position Default Notes
file 1 <empty> The path to the page, resource or file to be included. Page and resource paths adhere to Hugo’s logical path. If not found by logical path it falls back to Hugo’s build-in readFile function
hidefirstheading 2 false When true and the included file contains headings, the first heading will be hidden. This comes in handy, eg. if you include otherwise standalone Markdown files.


Arbitrary Content

{{% include "shortcodes/include/" %}}

You can add standard markdown syntax:

  • multiple paragraphs
  • bullet point lists
  • emphasized, bold and even bold emphasized text
  • links
  • etc.1
...and even source code

the possibilities are endless (almost - including other shortcodes may or may not work) (almost - including other shortcodes may or may not work)

  1. Et Cetera (English: /ɛtˈsɛtərə/), abbreviated to etc., etc, et cet., is a Latin expression that is used in English to mean “and other similar things”, or “and so forth” ↩︎