Open alexpov opened 5 years ago
Same issue here. I've had luck with using npm run preview
instead of npm start
during local development.
If someone can dig in and get a fix together I'm happy to review and merge.
I receive a bunch of "function hugo not defined when running npm start or npm run preview when using a theme
ERROR 2019/05/30 00:26:18 Failed to add template "404.html" in path "404.html": template: 404.html:49: function "hugo" not defined ERROR 2019/05/30 00:26:18 Failed to add template "_default/list.html" in path "_default/list.html": template: _default/list.html:49: function "hugo" not defined ERROR 2019/05/30 00:26:18 Failed to add template "_default/single.html" in path "_default/single.html": template: _default/single.html:49: function "hugo" not defined ERROR 2019/05/30 00:26:18 Failed to add template "index.html" in path "index.html": template: index.html:49: function "hugo" not defined
I'm also seeing a bunch of Failed to add template... function "hugo" not defined"
as well while trying to use a theme. Same with npm run preview
using hugo server -D
command from the site
folder works
Any update on this? Having the same problem using themes, it looks like webpack is somehow running the non-extended version of hugo (thus not building the themes sass), but I have extended installed via Homebrew and running hugo server/build works fine.
When trying to use victor-hugo with themes, and running the
npm start
script as stated in the guide. Getting a site with broken CSS.Tried to use the starta theme based on this tutorial: A Step-by-Step Guide: Victor-Hugo on Netlify and the tranquilpeak theme.
The
npm run build
command works well. When the site is deployed to netlify, all is good. The issue is only in the local dev environment.When setting the baseURL from
/
tohttps://mydomain.com
the issue seems to be resolved, however, all links are relative tohttps://mydomain.com
thus each click opens the deployed version and not the localhost versionAs a workaround, using
hugo server -D
command from thesite
folderHugo version: 0.5.4