It’s written in README that I need to add {{ partial "tnd-addtocal/add" . }} to add the calendar button. It works ok.
But then I supposed to add {{ partial "tnd-addtocal/assets" . }} in order to have the button functionality and icons. But wherever I’m trying to add this line of code it breaks my app.
The error:
Failed to render pages: render of "section" failed: execute of template failed: template: events/list.html:3:8: executing "events/list.html" at <partial "head.html" .>: error calling partial: "/home/magda/projects-2021/bitbetter.club/hugo-version/themes/basic/layouts/partials/head.html:36:5": execute of template failed: template: partials/head.html:36:5: executing "partials/head.html" at <partial "tnd-addtocal/assets" .>: error calling partial: partial "tnd-addtocal/assets" not found
I’m quite new to Hugo, so I simply don’t know how to add assets from the module.
Thank you for the reply. I changed this line and now at least it doesn’t break the whole app but there’s still an error in button.js
The toggle is opened all the time and there are no icons.
@regis One more question. I don’t exactly understand what it means by Also, be sure the following partial is called (only once) on any page with the calendar button. It will add the button styles and scripts:
I added this ```
{{ partial “tnd-addtocal/tags” . }}
in head.html. But should I add it in events/single.html instead? In the same file where I added the button?
Yes, I did overwrite this part of CSS.
Sorry for bothering you again, but should it display google calendar, apple and other icons from the icons folder or I need to add them somehow myself?
@regis, I hope I can ask you one more question about this module.
When I want to add an event to google calendar in the notes part, the Event Link is generated. On the local server it looks like this: Event Link: //localhost:1313/events/page-title/ but after deploying I have only: Event Link: /events/page-title/
How can I get the full link to the website?
I was trying to add it as a venue but it doesn’t work.
This behaviour sounds like you have no baseURL defined in your configuration. Locally Hugo just adds the //localhost:1313/ in that case. On deploy / is assumed.
Ok, I’m coming back with another question even though it is not this module specific.
When I have baseURL set in config I can’t see the page on predeploy, how can I make it more flexible?