Skip to content

When generating sections with content adapters all pages created with the content adapter create links on the section pages #2449

@ITblacksheep

Description

@ITblacksheep

Environment

  • [ 12/13] Version of Docsy you are using:
  • How are you using Docsy? As a:
    • [x ] Hugo module
    • NPM module
    • Git submodule
    • Other:
  • [151 ] Version of Hugo you are using (output of hugo version):
  • OS:
    • [x ] Linux
    • macOS
    • Windows
    • Other:

Problem

I am generating multiple layers of pages from a json file with a content adapter. Every section page has links for all the various pages created with the content adapter. I worked around this by adding this filter to section-index. It is because the File for any page generated by content adapters is _content.gotmpl

{{ if eq $page.File.LogicalName "_content.gotmpl" }}
{{ $pages = (where $pages "Parent.Path" "==" $page.Path) -}}
{{ end }}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions