DocPort Documentation

attachments

The Attachments shortcode displays a list of files attached to a page. Example :

Usage

The shortcurt lists files found in the _files folder.

  1. If your page is a folderA, attachements must be place in a '_files’ subfolder.
content
└── folderA
       ├── _index.md
       └── _files
              ├── attachment.pdf
              └── attachment.pdf

That’s all !

parameters

Parameter Default Description
title “Attachments” List’s title
pattern “.*” A regular expressions, used to filter the attachments by file name.

Demo

List of attachments ending in pdf or mp4

    {{%attachments title="Related files" pattern=".*(pdf|mp4)"/%}}

renders as

  • Carroll_AliceAuPaysDesMerveilles.pdf  (175 kB)
  • adivorciarsetoca00cape.pdf  (212 kB)
  • movieselectricsheep-flock-244-32500-2.mp4  (340 kB)