giraffeacademy / ga-hugo-theme Goto Github PK
View Code? Open in Web Editor NEWA "Hugo - Static Site Generator" theme used in Giraffe Academy's Hugo course.
License: MIT License
A "Hugo - Static Site Generator" theme used in Giraffe Academy's Hugo course.
License: MIT License
Your rendered home page is blank: /index.html is zero-length
I followed the exact same procedure described in your video.
Follow along on video (number 06),
When hugo server -D
runs, an error occurs.
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
I found a Hugo discourse response that said Page URL is deprecated. Also a github issue.
Change .URL
to .RelPermalink
in themes/ga-hugo-theme/layouts/_default/list.html solves the error.
<div style="font-size:20px;">
<a href="{{.RelPermalink}}">{{.Title}}</a>
{{/*
Deprecated
https://discourse.gohugo.io/t/can-t-evaluate-field-url-in-type-page-page/44421/2
<a href="{{.URL}}">{{.Title}}</a>
*/}}
</div>
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.
If you are using any code formatter, the code will break due to a bad practice in the existing code.
In layouts -> _default -> list.html : the hrefs have nested double quotes. One solution is to use backticks instead of double quotes for the internal strings.
print ('Hello World')
Among so many other problems with the 'tutorial'.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.