This is a continuation of Partial Fallbacks since it was archived without warning.
In the Hugo doc that explains the new templating system, there’s this explanation of “identifiers” which I’ll admit I didn’t pay attention to that keyword before. The first two columns in this table came straight from that doc. After some testing, I added the third column of what I see is supported for partials.
| Identifier | Description | Works for partials? |
|---|---|---|
| Layout custom | The custom layout set in front matter. |
no |
| Page kinds | One of home, section, taxonomy, term, page. |
yes |
| Layouts standard 1 | list or single. |
no |
| Output format | The output format (e.g., html, rss). |
yes |
| Layouts standard 2 | all. |
no |
| Language | The language (e.g., en). |
yes |
| Media type | The media type (e.g., text/html). |
|
| Page path | The page path (e.g., /blog/mypost). |
no |
| Type | type set in front matter. |
no |
Looks like @irkode’s data in content: Describe/clarify use of identifiers in template file names · Issue #3248 · gohugoio/hugoDocs · GitHub seems to agree with this.
I’m thinking, the section that covers these identifiers in docs should be moved to it’s own section or page, outside of (new system) and explained even further. Then, in pages that explain specific templates, such as partials, it can be referenced with a list of which identifiers are or are not supported.
Right now, the section about partials mentions the word “kinds” once, and it’s in a sentence speaking about a lack of support. That’s where it’s confusing. Kinds are supported, as an identifier.
Anyone have further thoughts on this before I try to put something together on GitHub?
@jmooring Why was my original topic archived? The discussion clearly wasn’t finished.