RCODI / rcodi-blog

RCODI Blog
https://rcodi-blog.netlify.app
MIT License
3 stars 3 forks source link

Hugo -D, Wowchemy CMS Fault #56

Open ybvau opened 2 years ago

ybvau commented 2 years ago

Background: Setting up the Wowchemy CMS to be used would make it easier for additional users to edit the content of the website. It would be more like Wordpress and less CLI-heavy, which could be useful for faster content creation and easier means of updating. It seems like it broke a while ago.

Issue: Error: Error building site: failed to render pages: render of "page" failed: execute of template failed: template: _default/single.html:5:3: executing "_default/single.html" at <partial "site_head" .>: error calling partial: "/var/folders/9w/nmr46vcn2jlb3nx3grfknssh0000gn/T/hugo_cache/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-modules/wowchemy@v0.0.0-20210324194200-fda9f39d872e/layouts/partials/site_head.html:174:13": execute of template failed: template: partials/site_head.html:174:13: executing "partials/site_head.html" at <getenv "WC_POST_CSS">: error calling getenv: access denied: "WC_POST_CSS" is not whitelisted in policy "security.funcs.getenv"; the current security configuration is:

[security] enableInlineShortcodes = true [security.exec] allow = ['^dart-sass-embedded$', '^go$', '^npx$', '^postcss$'] osEnv = ['(?i)^(PATH|PATHEXT|APPDATA|TMP|TEMP|TERM)$']

[security.funcs] getenv = ['^HUGO_']

[security.http] methods = ['(?i)GET|POST'] urls = ['.*']

Total in 2498 ms

Issue (2): Hugo -D presents a similar issue, which leads me to think there's a fundamental problem for the build of the website. Looks like we need to update . . ? Will explore further

hugo v0.92.2+extended darwin/amd64 BuildDate=unknown WARN 2022/02/24 12:43:18 .Path when the page is backed by a file is deprecated and will be removed in a future release. We plan to use Path for a canonical source path and you probably want to check the source is a file. To get the current behaviour, you can use a construct similar to the one below:

{{ $path := "" }} {{ with .File }} {{ $path = .Path }} {{ else }} {{ $path = .Path }} {{ end }}

twinblade02 commented 1 year ago

I think this has been resolved; marked for closure