It works for single content pages such as content/_index/index.md or content/_index/hero.md, but as bep confirmed it is not ready for single page apps, which basically provider multiple files for this.
It basically errors on using content/_index/ with multiple files. I would love this to work as that is the cleanest method.
Afaik this would solve the index.xml issue, the /index/ not 404 issue and issues with the sitemap.
I’ve been struggling to find a way to choose which content files to generate or not the pages. For now, only data files, but they have other issues (like the dammed trimmed <p>).
Just wondering if there has been any more development with this.
I have a page in the content folder content/about.md whose contents I would like to render on the home page. So far this is the only thing that worked for me:
{{ range (where .Pages "Title" "About") }}
{{ .Content }}
{{ end }}
Is there a better solution for rendering a single content page that is not part of a section?
Ah ok, thank you for the explanation. .Site.GetPage was one of the things I tried initially but didn’t get the syntax quite right.
Is there a Hugo doc page that shows all of the different parameters or arguments that can be passed into .Site.GetPage? Like “page” and “section” and “Title”?