Skip to main content

Gallery

Published:

The gallery content type is designed to be minimal. Pages render without a sidebar, table of contents, or related content by default. These are theme parameters so the fields should goes under params key.

Page configuration

Accepted fields for individual pages of type gallery. If the Front Matter column shows ❌, the field cannot be overridden via front matter.

NameTypeFront MatterDescription
linkbooleanURL link to any internal or external page.
breadcrumbbooleanShow breadcrumb navigation above the page title. Not shown unless explicitly enabled.
galleryPageLeadstringA short lead paragraph shown below the title.
pageShowMetabooleanShow the publish date below the title.
pageNoListbooleanExclude this page from search indexing and from list views.

Section configuration

Gallery sections share the same grouping and sorting fields as blog and docs sections. See shared configuration for listScope, sectionGroupBy, sectionGroupLayout, sectionGroupOrder, sectionSortBy, and sectionSortOrder.

Advanced Usage

The blog section's layout doesn't support cover images. To add cover image support, set its type to gallery to use the gallery's section layout instead.

hugo.yaml
cascade:
  - type: gallery
    target:
      path: '{/blog,/blog/**}'
      kind: section

You might also want to give your blog cover a different look, which you can specify using a CSS selector:

main:has(.gallery-page-item[href*='/blog/']) /* ... */ {
  /* ... */
}

Backlinks

Article Connections

Accessibility settings

Font size