I am able to display the data from this .md file using this syntax :
{{- partial "homepage/offers.html" . -}} using the . to pass context in my index.html file.
{{ .Params.offers.title | safeHTML }} and accessing the data thanks to the .Params variable, in my offers partial.
But when iβm using this syntax, Iβm not able to display the data from βoffersβ, which is in my $section variable : {{ $section := site.GetPage "offers" }}, because the .Params variables already refers to something else, I guess?
Sorry if itβs still not clear, iβll be happy to provide other details if needed.
Everything is working for me. I must be doing something wrong. Try this:
git clone --single-branch -b hugo-forum-topic-31847 https://github.com/jmooring/hugo-testing hugo-forum-topic-31847
cd hugo-forum-topic-31847
hugo server
You reproduced perfectly my setup : I went and pasted everything from your files just to be sure to not miss anything, and after doing that it just worked on my project too, though Iβm not even sure what was the problem about.
I think I got things mixed up while trying different solutions and did not fully revert to a clean state.
That is the only layout I am calling the partial from. Before trying that I was trying to pass variables like this : {{- partial "homepage/offers.html" (dict "context" . "pages" $.Site.Pages) -}} when in fact it was much simpler, like I suspected.
My guess is that I probably forgot the β.β in my code like this : {{- partial "homepage/offers.html" -}} but somehow added it when I simplified the file here on the topicβ¦