Metadata in a single MD file for multiple terms

There is only a single taxonomy categories on my website. It has a general layout categories/taxonomy.html, regardless of the term. I cannot find the way to do the same thing with the metadata, so that I have a single markdown file with the front matter defining general metadata for all terms. Something like content/categories/_index.md.

For example, I need this for a (bootstrap-like) jumbotron image, whose path I define in the front matter in markdown files, and here, I want to have it the same for all term pages.

Data that is the same for all terms belongs in the taxonomy front matter… you just need to get it.

layouts/
└── _default/
    ├── baseof.html
    ├── home.html
    ├── list.html
    ├── single.html
    ├── taxonomy.html  <-- list of terms
    └── term.html      <-- list of pages associated with each term

content/categories/_index.md

+++
title = 'Categories'
date = 2023-02-01T06:10:31-08:00
draft = false
foo = 'bar'
+++

layouts/_default/term.html

{{ define "main" }}
  <h1>{{ .Title }}</h1>
  {{ .Content }}

  {{ .Parent.Params.foo }} 

  {{ range .Pages }}
    <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
  {{ end }}
{{ end }}

Taxonomy is the parent of terms. Of course, that could have crossed my mind. Thanks!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.