Closed jasikpark closed 4 years ago
So the error actually does not appear on aa4ccb
but it does on the current Dockerfile version.
Hmmm apparently this is an error that only shows up in the gohugio/hugo docker container?
I tried it with gohugoio/hugo:0.31 and I got similar errors.
calebjasik@Calebs-MacBook-Pro jasik-xyz % docker run -it -v /Users/calebjasik/Desktop/Github/jasik-xyz:/jasik-xyz -w /jasik-xyz -p 1313:1313 gohugoio/hugo:0.31 server --bind 0.0.0.0
Unable to find image 'gohugoio/hugo:0.31' locally
0.31: Pulling from gohugoio/hugo
d39321e59709: Pull complete
Digest: sha256:567899ebd9a1d56c32426beac2ca36cd75b0f917a7a51450fefcdce3edbf1a1d
Status: Downloaded newer image for gohugoio/hugo:0.31
Started building sites ...
ERROR 2019/12/31 20:55:55 Unable to locate template for shortcode "twitter" in page "a-tweet.md"
ERROR 2019/12/31 20:55:55 Got error reading Git log: Git executable not found in $PATH
ERROR 2019/12/31 20:55:55 error processing shortcode "shortcodes/img.html" for page "photos/small-fig-tree/index.md": html/template:shortcodes/img.html:38:38: {{.}} appears in an ambiguous context within a URL
ERROR 2019/12/31 20:55:55 error processing shortcode "shortcodes/img.html" for page "photos/large-fig-update/index.md": html/template:shortcodes/img.html:38:38: {{.}} appears in an ambiguous context within a URL
ERROR 2019/12/31 20:55:55 error processing shortcode "shortcodes/img.html" for page "photos/fig-tree/index.md": html/template:shortcodes/img.html:38:38: {{.}} appears in an ambiguous context within a URL
ERROR 2019/12/31 20:55:55 error processing shortcode "shortcodes/img.html" for page "photos/hedgehog/index.md": html/template:shortcodes/img.html:38:38: {{.}} appears in an ambiguous context within a URL
ERROR 2019/12/31 20:55:55 error processing shortcode "shortcodes/img.html" for page "photos/hello/index.md": html/template:shortcodes/img.html:38:38: {{.}} appears in an ambiguous context within a URL
ERROR 2019/12/31 20:55:55 error processing shortcode "shortcodes/img.html" for page "photos/first-plant-post/index.md": html/template:shortcodes/img.html:38:38: {{.}} appears in an ambiguous context within a URL
ERROR 2019/12/31 20:55:55 error processing shortcode "shortcodes/img.html" for page "coco-mlem/index.md": html/template:shortcodes/img.html:38:38: {{.}} appears in an ambiguous context within a URL
ERROR 2019/12/31 20:55:55 error processing shortcode "shortcodes/img.html" for page "starbucks-at-zachry/index.md": html/template:shortcodes/img.html:38:38: {{.}} appears in an ambiguous context within a URL
ERROR 2019/12/31 20:55:55 Failed to get json resource https://api.instagram.com/oembed/?url=https://instagram.com/p/BmvyRlcgX9U/&hidecaption=0 with error message Get https://api.instagram.com/oembed/?url=https://instagram.com/p/BmvyRlcgX9U/&hidecaption=0: x509: failed to load system roots and no roots provided
ERROR 2019/12/31 20:55:55 error processing shortcode "_internal/shortcodes/instagram.html" for page "attempt-at-showing-an-instagram-post.md": template: _internal/shortcodes/instagram.html:1:238: executing "_internal/shortcodes/instagram.html" at <getJSON "https://api...>: error calling getJSON: Get https://api.instagram.com/oembed/?url=https://instagram.com/p/BmvyRlcgX9U/&hidecaption=0: x509: failed to load system roots and no roots provided
ERROR 2019/12/31 20:55:55 Error while rendering "page": template: _default/single.html:29:14: executing "_default/single.html" at <.PrevPage>: can't evaluate field PrevPage in type *hugolib.PageOutput
ERROR 2019/12/31 20:55:55 Error while rendering "home": template: index.html:76:41: executing "index.html" at <.Page.Title>: can't evaluate field Page in type *hugolib.Page
ERROR 2019/12/31 20:55:55 Error while rendering "section": template: _default/list.html:12:39: executing "_default/list.html" at <.Page.Title>: can't evaluate field Page in type *hugolib.Page
ERROR 2019/12/31 20:55:55 Error while rendering "taxonomy": template: _default/list.html:12:39: executing "_default/list.html" at <.Page.Title>: can't evaluate field Page in type *hugolib.Page
ERROR 2019/12/31 20:55:55 Error while rendering "404": template: 404.html:11:3: executing "404.html" at <partial "footer.html...>: error calling partial: template: partials/footer.html:12:48: executing "partials/footer.html" at <.Page.Title>: can't evaluate field Page in type *hugolib.Page
Built site for language en:
0 of 4 drafts rendered
0 future content
0 expired content
31 regular pages created
52 other pages created
8 non-page files copied
0 paginator pages created
18 tags created
2 categories created
total in 444 ms
Watching for changes in /jasik-xyz/{content,layouts,static}
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/ (bind address 0.0.0.0)
Press Ctrl+C to stop
Ah. I have discovered the problem. the docker image is using 0.32-DEV
and does not build from HEAD as I assumed.
I see that this repo contains an up to date docker image -- could it possibly also be published on Docker Hub?
We (I) plan to use GitHub to publish docker images.
https://github.com/gohugoio/hugo/pull/6405#issuecomment-548280568
In that case, is there a way that the gohugoio/hugo Dockerfile could be removed from Docker Hub? It's misleading.
The user who created the gohugoio on Docker Hub can delete it. Who is he or she? We do not know...
hmm that doesn't seem to be the author, just the source repo
Hugo (this project) does not have a Docker file on Hub.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
What version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
No, 0.62.0 does not produce this error.
When trying to build my site against the Docker image with Github Actions, I received the error
{{(print $small.RelPermalink)}} appears in an ambiguous context within a URL
, which is not a clear error at all -- if y'all disagree maybe you could point me towards where in the documentation I could add a note about it?https://github.com/jasikpark/jasik-xyz/commit/2fbc361ff91c52c6f8af6e8d0b11768bf18f46c1/checks?check_suite_id=378124148
^^ here's the CI build run
https://github.com/jasikpark/jasik-xyz/blob/add-new-hugo-version-workflow/layouts/shortcodes/img.html
^^ here's the shortcode in question
This hasn't been a problem in any other version, so I would like to help try to figure out why that's an error.