URI: 
       docshelper: Improve template lookup order descriptions - hugo - [fork] hugo port for 9front
  HTML git clone git@git.drkhsh.at/hugo.git
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
   DIR README
   DIR LICENSE
       ---
   DIR commit 90944aa261acf596af774dcea0db1fc31dccc973
   DIR parent db7bc49690f8e274ce35b723a43c1b6f36922e76
  HTML Author: Joe Mooring <joe.mooring@veriphor.com>
       Date:   Sun, 13 Aug 2023 09:29:04 -0700
       
       docshelper: Improve template lookup order descriptions
       
       - 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 gohugoio/hugoDocs#1734
       
       Diffstat:
         M docs/data/docs.yaml                 |     262 ++++++++++++++++---------------
         M output/docshelper.go                |      33 +++++++++++++++++--------------
       
       2 files changed, 151 insertions(+), 144 deletions(-)
       ---
   DIR diff --git a/docs/data/docs.yaml b/docs/data/docs.yaml
       @@ -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
       @@ -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:
       @@ -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
       @@ -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
       @@ -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
       @@ -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
       @@ -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
       @@ -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
       @@ -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
       @@ -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
       @@ -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
       @@ -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
       @@ -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:
   DIR diff --git a/output/docshelper.go b/output/docshelper.go
       @@ -41,31 +41,34 @@ func createLayoutExamples() any {
                        name string
                        d    layouts.LayoutDescriptor
                }{
       +
                        // Taxonomy layouts.LayoutDescriptor={categories category taxonomy en  false Type Section
                        {"Single page in \"posts\" section", layouts.LayoutDescriptor{Kind: "page", Type: "posts", OutputFormatName: "html", Suffix: "html"}},
                        {"Base template for single page in \"posts\" section", layouts.LayoutDescriptor{Baseof: true, Kind: "page", Type: "posts", OutputFormatName: "html", Suffix: "html"}},
       -                {"Single page in \"posts\" section with layout set", layouts.LayoutDescriptor{Kind: "page", Type: "posts", Layout: demoLayout, OutputFormatName: "html", Suffix: "html"}},
       -                {"Base template for single page in \"posts\" section with layout set", layouts.LayoutDescriptor{Baseof: true, Kind: "page", Type: "posts", Layout: demoLayout, OutputFormatName: "html", Suffix: "html"}},
       +                {"Single page in \"posts\" section with layout set to \"demolayout\"", layouts.LayoutDescriptor{Kind: "page", Type: "posts", Layout: demoLayout, OutputFormatName: "html", Suffix: "html"}},
       +                {"Base template for single page in \"posts\" section with layout set to \"demolayout\"", layouts.LayoutDescriptor{Baseof: true, Kind: "page", Type: "posts", Layout: demoLayout, OutputFormatName: "html", Suffix: "html"}},
                        {"AMP single page", layouts.LayoutDescriptor{Kind: "page", Type: "posts", OutputFormatName: "amp", Suffix: "html"}},
                        {"AMP single page, French language", layouts.LayoutDescriptor{Kind: "page", Type: "posts", Lang: "fr", OutputFormatName: "html", Suffix: "html"}},
       -                // All section or typeless pages gets "page" as type
       +                // Typeless pages get "page" as type
                        {"Home page", layouts.LayoutDescriptor{Kind: "home", Type: "page", OutputFormatName: "html", Suffix: "html"}},
                        {"Base template for home page", layouts.LayoutDescriptor{Baseof: true, Kind: "home", Type: "page", OutputFormatName: "html", Suffix: "html"}},
       -                {"Home page with type set", layouts.LayoutDescriptor{Kind: "home", Type: demoType, OutputFormatName: "html", Suffix: "html"}},
       -                {"Base template for home page with type set", layouts.LayoutDescriptor{Baseof: true, Kind: "home", Type: demoType, OutputFormatName: "html", Suffix: "html"}},
       -                {"Home page with layout set", layouts.LayoutDescriptor{Kind: "home", Type: "page", Layout: demoLayout, OutputFormatName: "html", Suffix: "html"}},
       +                {"Home page with type set to \"demotype\"", layouts.LayoutDescriptor{Kind: "home", Type: demoType, OutputFormatName: "html", Suffix: "html"}},
       +                {"Base template for home page with type set to \"demotype\"", layouts.LayoutDescriptor{Baseof: true, Kind: "home", Type: demoType, OutputFormatName: "html", Suffix: "html"}},
       +                {"Home page with layout set to \"demolayout\"", layouts.LayoutDescriptor{Kind: "home", Type: "page", Layout: demoLayout, OutputFormatName: "html", Suffix: "html"}},
                        {"AMP home, French language", layouts.LayoutDescriptor{Kind: "home", Type: "page", Lang: "fr", OutputFormatName: "amp", Suffix: "html"}},
                        {"JSON home", layouts.LayoutDescriptor{Kind: "home", Type: "page", OutputFormatName: "json", Suffix: "json"}},
                        {"RSS home", layouts.LayoutDescriptor{Kind: "home", Type: "page", OutputFormatName: "rss", Suffix: "xml"}},
       -                {"RSS section posts", layouts.LayoutDescriptor{Kind: "section", Type: "posts", OutputFormatName: "rss", Suffix: "xml"}},
       -                {"Taxonomy in categories", layouts.LayoutDescriptor{Kind: "taxonomy", Type: "categories", Section: "category", OutputFormatName: "rss", Suffix: "xml"}},
       -                {"Term in categories", layouts.LayoutDescriptor{Kind: "term", Type: "categories", Section: "category", OutputFormatName: "rss", Suffix: "xml"}},
       -                {"Section list for \"posts\" section", layouts.LayoutDescriptor{Kind: "section", Type: "posts", Section: "posts", OutputFormatName: "html", Suffix: "html"}},
       -                {"Section list for \"posts\" section with type set to \"blog\"", layouts.LayoutDescriptor{Kind: "section", Type: "blog", Section: "posts", OutputFormatName: "html", Suffix: "html"}},
       -                {"Section list for \"posts\" section with layout set to \"demoLayout\"", layouts.LayoutDescriptor{Kind: "section", Layout: demoLayout, Section: "posts", OutputFormatName: "html", Suffix: "html"}},
       -
       -                {"Taxonomy list in categories", layouts.LayoutDescriptor{Kind: "taxonomy", Type: "categories", Section: "category", OutputFormatName: "html", Suffix: "html"}},
       -                {"Taxonomy term in categories", layouts.LayoutDescriptor{Kind: "term", Type: "categories", Section: "category", OutputFormatName: "html", Suffix: "html"}},
       +
       +                {"Section list for \"posts\"", layouts.LayoutDescriptor{Kind: "section", Type: "posts", Section: "posts", OutputFormatName: "html", Suffix: "html"}},
       +                {"Section list for \"posts\" with type set to \"blog\"", layouts.LayoutDescriptor{Kind: "section", Type: "blog", Section: "posts", OutputFormatName: "html", Suffix: "html"}},
       +                {"Section list for \"posts\" with layout set to \"demolayout\"", layouts.LayoutDescriptor{Kind: "section", Layout: demoLayout, Section: "posts", OutputFormatName: "html", Suffix: "html"}},
       +                {"Section list for \"posts\"", layouts.LayoutDescriptor{Kind: "section", Type: "posts", OutputFormatName: "rss", Suffix: "xml"}},
       +
       +                {"Taxonomy list for \"categories\"", layouts.LayoutDescriptor{Kind: "taxonomy", Type: "categories", Section: "category", OutputFormatName: "html", Suffix: "html"}},
       +                {"Taxonomy list for \"categories\"", layouts.LayoutDescriptor{Kind: "taxonomy", Type: "categories", Section: "category", OutputFormatName: "rss", Suffix: "xml"}},
       +
       +                {"Term list for \"categories\"", layouts.LayoutDescriptor{Kind: "term", Type: "categories", Section: "category", OutputFormatName: "html", Suffix: "html"}},
       +                {"Term list for \"categories\"", layouts.LayoutDescriptor{Kind: "term", Type: "categories", Section: "category", OutputFormatName: "rss", Suffix: "xml"}},
                } {
        
                        l := layouts.NewLayoutHandler()