laozhu/hugo-nuo

直接下载安装的用的examplesite,启动就报错

tesroom opened this issue · 5 comments

Started building sites ...
ERROR: 2018/12/13 17:18:53 template.go:495: Failed to add template theme/partials/footer.html in path /mnt/c/Users/DELL/Documents/blog/themes/hugo-nuo/layouts/partials/footer.html: template: theme/partials/footer.html:1: function "resources" not defined
ERROR: 2018/12/13 17:18:53 template.go:495: Failed to add template theme/partials/head.html in path /mnt/c/Users/DELL/Documents/blog/themes/hugo-nuo/layouts/partials/head.html: template: theme/partials/head.html:4: function "resources" not defined
ERROR: 2018/12/13 17:18:53 template.go:495: Failed to add template theme/partials/header.html in path /mnt/c/Users/DELL/Documents/blog/themes/hugo-nuo/layouts/partials/header.html: template: theme/partials/header.html:1: function "resources" not defined
ERROR: 2018/12/13 17:18:53 template.go:495: Failed to add template theme/post/single.html in path /mnt/c/Users/DELL/Documents/blog/themes/hugo-nuo/layouts/post/single.html: template: /mnt/c/Users/DELL/Documents/blog/themes/hugo-nuo/layouts/_default/baseof.html:18: function "now" not defined
ERROR: 2018/12/13 17:18:53 template.go:529: template: theme/partials/footer.html:1: function "resources" not defined
ERROR: 2018/12/13 17:18:53 template.go:529: template: theme/partials/head.html:4: function "resources" not defined
ERROR: 2018/12/13 17:18:53 template.go:529: template: theme/partials/header.html:1: function "resources" not defined
ERROR: 2018/12/13 17:18:53 template.go:529: template: /mnt/c/Users/DELL/Documents/blog/themes/hugo-nuo/layouts/_default/baseof.html:18: function "now" not defined
ERROR: 2018/12/13 17:18:53 general.go:236: theme/partials/head.html is an incomplete or empty template
ERROR: 2018/12/13 17:18:53 general.go:236: theme/partials/header.html is an incomplete or empty template
ERROR: 2018/12/13 17:18:53 general.go:236: theme/partials/footer.html is an incomplete or empty template
Built site for language en:
0 draft content

请问是我哪里设置的不对么?

 function "resources" not defined

会不会是你 hugo 的版本太老了, resources 的功能是新出来的,这个主题里用到的。

gkfnf commented

用 Hugo extend 版本的好像才支持 scss

@gkfnf 标准的 Hugo 直接支持 SCSS,对 PostCSS 支持要额外全局装 postcss-cli 这个包,这个主题已经切换到 SCSS 了,现在只要 hugo 装好就可以直接 build 了。

gkfnf commented

我当时没装这个包,所以后边直接下的 extend 的版本。 现在自定义主题遇到了一些问题, 比如我弄了一个目录,我希望它位置是悬停的,能跟踪到我浏览到了什么标题,然后我把它的 Position属性设置成 fixed,但是因为它的位置是固定的,屏幕变化的时候就显示得不正常了。然后就是声享 ppt 在我的 iphonese 上边显示不出来, 因为手机屏幕太小了。也没学过前端的东西,不知道这两个问题有没有什么解决的办法?

@gkfnf 你好

  • 第一个是文章 TOC 的新特性,这个主题暂时还不支持的,等有时间加一个;
  • 第二个问题我倒是没有遇到,可能你的 SE 屏幕太小了吧,也解决不了