One
Photo1.png
Photo2.png
Description.md
MoreInfo.md
Places
Two
Photo3.png
Photo4.png
Description.md
MoreInfo.md
And a content adapter that produces pages for /Place/One and /Places/Two
How can I make a single page template that includes the .Content of the Adapter produced Page object and the resources in the leaf page bundle for the same url path. In my attempts .Page.Resources is always empty. (Well, it includes something called “Staler”)
Thank you for your response. I created a minimal repo that shows what I’m working with. The readme describes what I’m trying to do (I’ve also added it below). I’ve played with it enough now to know that what I’m trying probably isn’t going to work. But I’m hoping for suggestion on best practices to achieve the goal with hugo.
This is a test repo for a question about the Hugo Static Site Generator
I’m trying to use a _content.gotmpl file to generate pages from an xml file.
My Problem is that not all of the info I need is in the xml. For example, I want to add tags and a content description for some of the nodes in the xml file. I can’t edit the xml file directly as the XML file is produced elsewhere. So, I add some related .MD files in the content/places/ folder. My thought is that this can work as a page bundle for the content pages that are generated from the xml.
This is not working. I guess I understand why… I’m mixing two methods of creating page and it is sort of a chicken and egg scenario.
So, I guess my question is, how should I be doing this?
PS D:\projects\temp\hugo-content-adapter> hugo env
hugo v0.127.0-74e0f3bd63c51f3c7a0f07a7c779eec9e922957e+extended windows/amd64 BuildDate=2024-06-05T10:27:59Z VendorInfo=gohugoio
GOOS=“windows”
GOARCH=“amd64”
GOVERSION=“go1.22.2” github.com/sass/libsass=“3.6.5” github.com/webmproject/libwebp=“v1.3.2”
PS D:\projects\temp\hugo-content-adapter>
Interesting Idea. I like it. I was looking for how I could read data from the XML file like this. Examples are ellusive. Does this same index method work for XML. I’ll have to try it.
OK. You definitely pointed me in the right direction. Thanks.
I think for my case I can ditch the content adapter all together. I’ll define page bundles for each place and then peek into the kml data file to get locations.