.Permlink/.URL not working in partials

Tried the following solutions:

The solution works in the single.html template, but when moved to the partial… bupkis.

I’m feeling this should work whether in list, single or partial.

This is the code repository: GitHub - jsphpndr/covid-api-bahamas: This repository was created for COVID-19 data in The Bahamas.

https://gohugo.io/templates/partials/#use-partials-in-your-templates

One of the most common mistakes with new Hugo users is failing to pass a context to the partial call. In the pattern above, note how “the dot” ( . ) is required as the second argument to give the partial context.

None of your calls to social.html include context. For example…

This:

{{ partial "social.html" }}

Should be this:

{{ partial "social.html" . }}

Joe (@jmooring), you are indeed a good man and you’re quite right, I did indeed forget.

Thanks a million.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.