ga-hugo-theme
ga-hugo-theme copied to clipboard
Trying to follow the tutorial throws "fail to render" when creating a new page.
When a user tries to make a page (or any page for that matter), the rendering will fail with the following error
ERROR 2022/03/30 11:19:24 Failed to render pages: render of "home" failed: "/Users/path/to/test/site/themes/ga-hugo-theme/layouts/_default/list.html:14:31": execute of template failed: template: _default/list.html:14:31: executing "_default/list.html" at <.URL>: can't evaluate field URL in type page.Page
Steps to reproduce: create new hugo site, clone a theme, and attempt to add a page as the tutorial suggests.
You may have a too recent version of hugo. The site will render with some warnings with an older version of hugo.
I don't have all the versions of hugo built here but at least hugo v0.84.0 works ok for this example. 0.94.0 or the most recent versions of hugo will not work.
Okay! That makes sense. Thanks for the comment :) I will try this out
Same issue here. Remove .URL
can avoid compile error(but lose some convenience).
- <a href="{{.URL}}">{{.Title}}</a>
+ <a href="">{{.Title}}</a>
Replace {{.URL}} with {{.RelPermalink}} and it works just fine.
Thank you for your response!
Kind regards,
Corey Johnson +358445001976
On Mon, May 16, 2022, 10:22 Željko Szep @.***> wrote:
Replace {{.URL}} with {{.RelPermalink}} and it works just fine.
— Reply to this email directly, view it on GitHub https://github.com/giraffeacademy/ga-hugo-theme/issues/6#issuecomment-1127318110, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALLT2JKVCZC7ZSMEKWRKQFDVKHZUZANCNFSM5SBDQR2Q . You are receiving this because you authored the thread.Message ID: @.***>
Replace {{.URL}} with {{.RelPermalink}} and it works just fine.
Thank you. This resolved partly. However, it now provides a Dir1s link rather than showing b.md.. I tried with Permalink and seems like a temporary fix. I still dont get all the *.md in one page like the tutorial.