Skip to content
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

Doesn't work anymore #24

Open
pjebs opened this issue Dec 29, 2024 · 5 comments
Open

Doesn't work anymore #24

pjebs opened this issue Dec 29, 2024 · 5 comments

Comments

@pjebs
Copy link

pjebs commented Dec 29, 2024

I get this error message:

ERROR render of "page" failed: "/Users/x/Documents/my-site/themes/typographical/layouts/_default/baseof.html:3:7": execute of template failed: template: _default/single.html:3:7: executing "_default/single.html" at <partial "head.html" .>: error calling partial: execute of template failed: html/template:partials/head.html:107:15: no such template "_internal/google_analytics_async.html"
Built in 59 ms
Error: error building site: render: failed to render pages: render of "section" failed: "/Users/x/Documents/my-site/themes/typographical/layouts/_default/baseof.html:3:7": execute of template failed: template: _default/list.html:3:7: executing "_default/list.html" at <partial "head.html" .>: error calling partial: execute of template failed: html/template:partials/head.html:107:15: no such template "_internal/google_analytics_async.html"

@pjebs
Copy link
Author

pjebs commented Dec 29, 2024

I got it semi working by removing the Google Analytics code at the bottom of layout/partials/head.html and change .Site.IsServer to hugo.IsServer.

There are still some other issues.

@pjebs
Copy link
Author

pjebs commented Dec 29, 2024

I also had to change
resources.Get to resources.GetMatch in:

{{- $inServerMode := hugo.IsServer }}
    {{- $cssTarget    := "css/style.css" }}
    {{- $cssOptions   := cond ($inServerMode) (dict "targetPath" $cssTarget "enableSourceMap" true) (dict "targetPath" $cssTarget "outputStyle" "compressed") }}
    {{- $style      := resources.GetMatch "scss/typographical.scss" | resources.ExecuteAsTemplate "scss/typographical.scss" . | toCSS $cssOptions | minify | fingerprint }}

as per gohugoio/hugo#11239

@theramiyer
Copy link
Collaborator

Hi! Thank you for bringing this up. I’m currently travelling without access to my laptop/desktop. I will look into this once I’m back. Sorry you had to face this. And I’m glad you’ve worked around it for the time being.

@pjebs
Copy link
Author

pjebs commented Dec 29, 2024

@theramiyer Thanks for that. I had sent you an email about something else too.

@pjebs
Copy link
Author

pjebs commented Jan 14, 2025

@theramiyer what did you think of my email?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants