Skip to main content

Gallery

View Source Edit this page (external link)
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 Link to this heading

Accepted fields for individual pages of type gallery. All settings can be overridden in the front matter, unless explicitly noted as unsupported.

NameTypeDescription
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 Link to this heading

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 Link to this heading

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