-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error using module installation with “congo” theme #17
Comments
I don't know how and where you modified your code. So I'm just guessing here ... I guess I would create a new Plausible already take care of layout/partials/analytics.html<!-- Just one line calling plausible head partial -->
{{ partial “plausible_head.html” . }} |
Yes you encounter a context problem. You need to pass the right context because the error origin is line 76 when testing if it is a 404 page. So the simplest for you is my previous advice I guess.
|
I have created the one-line analytics.html as suggested. The congo theme has a chain of partials/templates I think. From the errors: So am I right in thinking that plausible_head only gets |
This seems to have fixed the problem - I copied the |
Ah yes if the context passed to I think you've done the right thing. |
If anyone else is following, here is the issue over at the congo repo: jpanther/congo#480 |
This has now been fixed in Congo. |
I’m trying to use the module approach with the
congo
theme, but I don’t suppose this is limited solely to the this theme.I’ve added
{{ partial “plausible_head.html” . }}
to thelayouts/partials/analytics.html
file which the congo theme uses to store all the analytics stuff that will be put into the header.However I suspect the variable scope/context is causing an issue (error:
<.Page.Kind>: can't evaluate field Page in type *hugolib.SiteInfo
), so I’m wondering if there is a more generic way to make this work using$.
to get the global context?Full error message below.
The text was updated successfully, but these errors were encountered: