Recursively set metadata in sections


it would be nice to have a front-matter variable for sections that sets metadata for all pages recursively

use case 1: consider a drafts/ folder. drafts/ might look like:

draft = true

use case 2: consider a blog/ folder, with a rust/ folder inside. blog/rust/ might look like:

tags = ["rust"]

there is a drawback: if you want to tag a post rust and web, you’d have to write rust again.

use case 3: consider a website using extra to define each page’s navigation. extra.nav is an array of tables, each table defining name and url. blog/ could look like:

name = "back"
url = "/blog/"

currently, some section variables apply to all pages, but most don’t. all would help making a distinction:

  • page_template could be obsoleted in favour of all.template
  • in_search_index could be obsoleted in favour of all.in_search_index, and later reintroduced to apply to the section page itself, but not its child pages


Interesting idea. Not planning that for the next release but i’ll think about it for the one after.