From 172bfbc4b488bdfd06c3f98336e93f5d0623ac3c Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Tue, 22 Jul 2025 13:07:47 -0700 Subject: [PATCH] content: Differentiate content view templates from other templates --- content/en/templates/types.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/content/en/templates/types.md b/content/en/templates/types.md index 685ae7bf0..93aea43f1 100644 --- a/content/en/templates/types.md +++ b/content/en/templates/types.md @@ -38,7 +38,8 @@ layouts/ │ ├── page.html │ └── section.html ├── films/ -│ ├── card.html <-- content view +│ ├── view_card.html <-- content view +│ ├── view_li.html <-- content view │ ├── page.html │ └── section.html ├── baseof.html @@ -325,19 +326,21 @@ For example, Hugo applies a _base_ template to the _home_ template below, then r {{ .Content }} {{ end }} ``` -```go-html-template {file="layouts/films/card.html"} +```go-html-template {file="layouts/films/view_card.html"}

{{ .LinkTitle }}

{{ .Summary }}
``` +In the example above, the content view template's name starts with `view_`. While not strictly required, this naming convention helps distinguish content view templates from other templates within the same directory, improving organization and clarity. + ## Render hook A _render hook_ template overrides the conversion of Markdown to HTML.