White Cabinet

Hugo Theme

Listing techniques

Posted on 9 Mar, 2020

The Section page should include a list of links to the pages within the corresponding section. To realize this, we have prepared three methods of listing pages.

Three listing methods

Each method of listing can be used by embedding the corresponding shortcode in the _index.md file. See the official documentation for a general description of shortcodes.

Text lists

textlist_fig

This is the most basic method, where the title of each page is listed in the order of their weight. This can be generated by embedding the shortcode

{{< textlist >}}

in the _index.md.

Tile lists

tilelist_fig

By setting an image for each page, the link to the page could be arranged in a tile-like format consisting of the image and the title as a caption. This will be useful if you have characteristic images for each page. This can be generated by embedding the shortcode

{{< tilelist >}}

in the _index.md. Note that the image can be specified by adding the link to the image to the image variable in the front matter of each page (i.e. .md file).

Post lists

postlist_fig

This method displays each page in a card-like format with the date and short preview of the content. You can also set tags to the page by writing them explicitly on the front matter. This method can be used similarly as the previous two by embedding the shortcode

{{< postlist >}}

in the _index.md, but is also intended to be used as a method of displaying date-dependent contents. Note that the usage for the latter is a little different from the description given here.