Skip to content

Commit

Permalink
docshelper: Improve template lookup order descriptions
Browse files Browse the repository at this point in the history
- Always include example for "with layout/type set"
- Use lowercase for "set to" examples (lookup is case sensitive)
- Consistent use of taxonomy and term

Fixes #1734
  • Loading branch information
jmooring authored and bep committed Aug 15, 2023
1 parent b0baa89 commit 2bfb3bf
Showing 1 changed file with 133 additions and 129 deletions.
262 changes: 133 additions & 129 deletions data/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -921,8 +921,8 @@ config:
dir: :cacheDir/:project
maxAge: -1
images:
dir: :cacheDir/images
maxAge: 1.8e+15
dir: :resourceDir/_gen
maxAge: -1
modules:
dir: :cacheDir/modules
maxAge: -1
Expand Down Expand Up @@ -1541,12 +1541,16 @@ config:
enableInlineShortcodes: false
exec:
allow:
- ^((dart-)?sass(-embedded)?|go|npx|postcss)$
- ^(dart-)?sass(-embedded)?$
- ^go$
- ^npx$
- ^postcss$
osEnv:
- (?i)^(PATH|PATHEXT|APPDATA|HOME|TMP|TEMP|TERM)$
- (?i)^((HTTPS?|NO)_PROXY|PATH(EXT)?|APPDATA|TE?MP|TERM|GO\w+|(XDG_CONFIG_)?HOME|USERPROFILE|SSH_AUTH_SOCK|DISPLAY|LANG)$
funcs:
getenv:
- ^(HUGO_|REPOSITORY_URL|^BRANCH$)
- ^HUGO_
- ^CI$
goTemplates:
allowActionJSTmpl: false
http:
Expand Down Expand Up @@ -1684,7 +1688,7 @@ output:
- layouts/_default/baseof.html.html
- layouts/_default/single-baseof.html
- layouts/_default/baseof.html
- Example: Single page in "posts" section with layout set
- Example: Single page in "posts" section with layout set to "demolayout"
Kind: page
OutputFormat: html
Suffix: html
Expand All @@ -1697,7 +1701,7 @@ output:
- layouts/_default/single.html.html
- layouts/_default/demolayout.html
- layouts/_default/single.html
- Example: Base template for single page in "posts" section with layout set
- Example: Base template for single page in "posts" section with layout set to "demolayout"
Kind: page
OutputFormat: html
Suffix: html
Expand Down Expand Up @@ -1774,7 +1778,7 @@ output:
- layouts/_default/home-baseof.html
- layouts/_default/list-baseof.html
- layouts/_default/baseof.html
- Example: Home page with type set
- Example: Home page with type set to "demotype"
Kind: home
OutputFormat: html
Suffix: html
Expand All @@ -1797,7 +1801,7 @@ output:
- layouts/_default/index.html
- layouts/_default/home.html
- layouts/_default/list.html
- Example: Base template for home page with type set
- Example: Base template for home page with type set to "demotype"
Kind: home
OutputFormat: html
Suffix: html
Expand Down Expand Up @@ -1826,7 +1830,7 @@ output:
- layouts/_default/home-baseof.html
- layouts/_default/list-baseof.html
- layouts/_default/baseof.html
- Example: Home page with layout set
- Example: Home page with layout set to "demolayout"
Kind: home
OutputFormat: html
Suffix: html
Expand Down Expand Up @@ -1913,121 +1917,7 @@ output:
- layouts/_default/home.xml
- layouts/_default/list.xml
- layouts/_internal/_default/rss.xml
- Example: RSS section posts
Kind: section
OutputFormat: rss
Suffix: xml
Template Lookup Order:
- layouts/posts/section.rss.xml
- layouts/posts/rss.xml
- layouts/posts/list.rss.xml
- layouts/posts/section.xml
- layouts/posts/list.xml
- layouts/section/section.rss.xml
- layouts/section/rss.xml
- layouts/section/list.rss.xml
- layouts/section/section.xml
- layouts/section/list.xml
- layouts/_default/section.rss.xml
- layouts/_default/rss.xml
- layouts/_default/list.rss.xml
- layouts/_default/section.xml
- layouts/_default/list.xml
- layouts/_internal/_default/rss.xml
- Example: Taxonomy in categories
Kind: taxonomy
OutputFormat: rss
Suffix: xml
Template Lookup Order:
- layouts/categories/category.terms.rss.xml
- layouts/categories/terms.rss.xml
- layouts/categories/taxonomy.rss.xml
- layouts/categories/rss.xml
- layouts/categories/list.rss.xml
- layouts/categories/category.terms.xml
- layouts/categories/terms.xml
- layouts/categories/taxonomy.xml
- layouts/categories/list.xml
- layouts/category/category.terms.rss.xml
- layouts/category/terms.rss.xml
- layouts/category/taxonomy.rss.xml
- layouts/category/rss.xml
- layouts/category/list.rss.xml
- layouts/category/category.terms.xml
- layouts/category/terms.xml
- layouts/category/taxonomy.xml
- layouts/category/list.xml
- layouts/taxonomy/category.terms.rss.xml
- layouts/taxonomy/terms.rss.xml
- layouts/taxonomy/taxonomy.rss.xml
- layouts/taxonomy/rss.xml
- layouts/taxonomy/list.rss.xml
- layouts/taxonomy/category.terms.xml
- layouts/taxonomy/terms.xml
- layouts/taxonomy/taxonomy.xml
- layouts/taxonomy/list.xml
- layouts/_default/category.terms.rss.xml
- layouts/_default/terms.rss.xml
- layouts/_default/taxonomy.rss.xml
- layouts/_default/rss.xml
- layouts/_default/list.rss.xml
- layouts/_default/category.terms.xml
- layouts/_default/terms.xml
- layouts/_default/taxonomy.xml
- layouts/_default/list.xml
- layouts/_internal/_default/rss.xml
- Example: Term in categories
Kind: term
OutputFormat: rss
Suffix: xml
Template Lookup Order:
- layouts/categories/term.rss.xml
- layouts/categories/category.rss.xml
- layouts/categories/taxonomy.rss.xml
- layouts/categories/rss.xml
- layouts/categories/list.rss.xml
- layouts/categories/term.xml
- layouts/categories/category.xml
- layouts/categories/taxonomy.xml
- layouts/categories/list.xml
- layouts/term/term.rss.xml
- layouts/term/category.rss.xml
- layouts/term/taxonomy.rss.xml
- layouts/term/rss.xml
- layouts/term/list.rss.xml
- layouts/term/term.xml
- layouts/term/category.xml
- layouts/term/taxonomy.xml
- layouts/term/list.xml
- layouts/taxonomy/term.rss.xml
- layouts/taxonomy/category.rss.xml
- layouts/taxonomy/taxonomy.rss.xml
- layouts/taxonomy/rss.xml
- layouts/taxonomy/list.rss.xml
- layouts/taxonomy/term.xml
- layouts/taxonomy/category.xml
- layouts/taxonomy/taxonomy.xml
- layouts/taxonomy/list.xml
- layouts/category/term.rss.xml
- layouts/category/category.rss.xml
- layouts/category/taxonomy.rss.xml
- layouts/category/rss.xml
- layouts/category/list.rss.xml
- layouts/category/term.xml
- layouts/category/category.xml
- layouts/category/taxonomy.xml
- layouts/category/list.xml
- layouts/_default/term.rss.xml
- layouts/_default/category.rss.xml
- layouts/_default/taxonomy.rss.xml
- layouts/_default/rss.xml
- layouts/_default/list.rss.xml
- layouts/_default/term.xml
- layouts/_default/category.xml
- layouts/_default/taxonomy.xml
- layouts/_default/list.xml
- layouts/_internal/_default/rss.xml
- Example: Section list for "posts" section
- Example: Section list for "posts"
Kind: section
OutputFormat: html
Suffix: html
Expand All @@ -2050,7 +1940,7 @@ output:
- layouts/_default/posts.html
- layouts/_default/section.html
- layouts/_default/list.html
- Example: Section list for "posts" section with type set to "blog"
- Example: Section list for "posts" with type set to "blog"
Kind: section
OutputFormat: html
Suffix: html
Expand Down Expand Up @@ -2079,7 +1969,7 @@ output:
- layouts/_default/posts.html
- layouts/_default/section.html
- layouts/_default/list.html
- Example: Section list for "posts" section with layout set to "demoLayout"
- Example: Section list for "posts" with layout set to "demolayout"
Kind: section
OutputFormat: html
Suffix: html
Expand Down Expand Up @@ -2108,7 +1998,28 @@ output:
- layouts/_default/posts.html
- layouts/_default/section.html
- layouts/_default/list.html
- Example: Taxonomy list in categories
- Example: Section list for "posts"
Kind: section
OutputFormat: rss
Suffix: xml
Template Lookup Order:
- layouts/posts/section.rss.xml
- layouts/posts/rss.xml
- layouts/posts/list.rss.xml
- layouts/posts/section.xml
- layouts/posts/list.xml
- layouts/section/section.rss.xml
- layouts/section/rss.xml
- layouts/section/list.rss.xml
- layouts/section/section.xml
- layouts/section/list.xml
- layouts/_default/section.rss.xml
- layouts/_default/rss.xml
- layouts/_default/list.rss.xml
- layouts/_default/section.xml
- layouts/_default/list.xml
- layouts/_internal/_default/rss.xml
- Example: Taxonomy list for "categories"
Kind: taxonomy
OutputFormat: html
Suffix: html
Expand Down Expand Up @@ -2145,7 +2056,49 @@ output:
- layouts/_default/terms.html
- layouts/_default/taxonomy.html
- layouts/_default/list.html
- Example: Taxonomy term in categories
- Example: Taxonomy list for "categories"
Kind: taxonomy
OutputFormat: rss
Suffix: xml
Template Lookup Order:
- layouts/categories/category.terms.rss.xml
- layouts/categories/terms.rss.xml
- layouts/categories/taxonomy.rss.xml
- layouts/categories/rss.xml
- layouts/categories/list.rss.xml
- layouts/categories/category.terms.xml
- layouts/categories/terms.xml
- layouts/categories/taxonomy.xml
- layouts/categories/list.xml
- layouts/category/category.terms.rss.xml
- layouts/category/terms.rss.xml
- layouts/category/taxonomy.rss.xml
- layouts/category/rss.xml
- layouts/category/list.rss.xml
- layouts/category/category.terms.xml
- layouts/category/terms.xml
- layouts/category/taxonomy.xml
- layouts/category/list.xml
- layouts/taxonomy/category.terms.rss.xml
- layouts/taxonomy/terms.rss.xml
- layouts/taxonomy/taxonomy.rss.xml
- layouts/taxonomy/rss.xml
- layouts/taxonomy/list.rss.xml
- layouts/taxonomy/category.terms.xml
- layouts/taxonomy/terms.xml
- layouts/taxonomy/taxonomy.xml
- layouts/taxonomy/list.xml
- layouts/_default/category.terms.rss.xml
- layouts/_default/terms.rss.xml
- layouts/_default/taxonomy.rss.xml
- layouts/_default/rss.xml
- layouts/_default/list.rss.xml
- layouts/_default/category.terms.xml
- layouts/_default/terms.xml
- layouts/_default/taxonomy.xml
- layouts/_default/list.xml
- layouts/_internal/_default/rss.xml
- Example: Term list for "categories"
Kind: term
OutputFormat: html
Suffix: html
Expand Down Expand Up @@ -2190,6 +2143,57 @@ output:
- layouts/_default/category.html
- layouts/_default/taxonomy.html
- layouts/_default/list.html
- Example: Term list for "categories"
Kind: term
OutputFormat: rss
Suffix: xml
Template Lookup Order:
- layouts/categories/term.rss.xml
- layouts/categories/category.rss.xml
- layouts/categories/taxonomy.rss.xml
- layouts/categories/rss.xml
- layouts/categories/list.rss.xml
- layouts/categories/term.xml
- layouts/categories/category.xml
- layouts/categories/taxonomy.xml
- layouts/categories/list.xml
- layouts/term/term.rss.xml
- layouts/term/category.rss.xml
- layouts/term/taxonomy.rss.xml
- layouts/term/rss.xml
- layouts/term/list.rss.xml
- layouts/term/term.xml
- layouts/term/category.xml
- layouts/term/taxonomy.xml
- layouts/term/list.xml
- layouts/taxonomy/term.rss.xml
- layouts/taxonomy/category.rss.xml
- layouts/taxonomy/taxonomy.rss.xml
- layouts/taxonomy/rss.xml
- layouts/taxonomy/list.rss.xml
- layouts/taxonomy/term.xml
- layouts/taxonomy/category.xml
- layouts/taxonomy/taxonomy.xml
- layouts/taxonomy/list.xml
- layouts/category/term.rss.xml
- layouts/category/category.rss.xml
- layouts/category/taxonomy.rss.xml
- layouts/category/rss.xml
- layouts/category/list.rss.xml
- layouts/category/term.xml
- layouts/category/category.xml
- layouts/category/taxonomy.xml
- layouts/category/list.xml
- layouts/_default/term.rss.xml
- layouts/_default/category.rss.xml
- layouts/_default/taxonomy.rss.xml
- layouts/_default/rss.xml
- layouts/_default/list.rss.xml
- layouts/_default/term.xml
- layouts/_default/category.xml
- layouts/_default/taxonomy.xml
- layouts/_default/list.xml
- layouts/_internal/_default/rss.xml
tpl:
funcs:
cast:
Expand Down

0 comments on commit 2bfb3bf

Please sign in to comment.