Tried the following solutions:
As far as I can see you already have addthis sharing buttons on the bottom of your post, but in my opinion you should consider using cleaner way just like @alexandros say.
I suggest you to put the sharing button between the tag and disqus element in layouts/_default/single.html
I’m building my own social share buttons using this CSS Tricks post. I can’t find how to apply URL encoding to my link (have had a look through all the Functions ). I’m sure it’s really obvious, or more likely called something else!
Any ideas? Thanks
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.
system
Closed
October 22, 2021, 3:24pm
4
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.