# Gallery

{{< badge
  text="page.html"
  url="https://github.com/ZhenShuo2021/hugo-yore/blob/main/layouts/gallery/page.html"
  variant="muted"
  appearance="accent"
  pill=true
>}}
{{< badge
  text="section.html"
  url="https://github.com/ZhenShuo2021/hugo-yore/blob/main/layouts/gallery/section.html"
  variant="muted"
  appearance="accent"
  pill=true
>}}

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`. All settings can be overridden in the front matter, unless explicitly noted as unsupported.

| Name | Type | Description |
| --- | --- | --- |
| `link` | `boolean` | URL link to any internal or external page. |
| `breadcrumb` | `boolean` | Show breadcrumb navigation above the page title. Not shown unless explicitly enabled. |
| `galleryPageLead` | `string` | A short lead paragraph shown below the title. |
| `pageShowMeta` | `boolean` | Show the publish date below the title. |
| `pageNoList` | `boolean` | Exclude 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](../80-blog/index.md#common-fields-section) 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.

```yaml {title="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:

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




## Ancestors of This Page (Auto Generated)



- https://yore.zsl0621.cc/zh-tw/docs/configuration/index.md

- https://yore.zsl0621.cc/zh-tw/docs/index.md
