Code Monkey home page Code Monkey logo

Comments (8)

CaiJimmy avatar CaiJimmy commented on May 24, 2024

请参考 exampleSite 文件夹下的配置

https://github.com/CaiJimmy/hugo-theme-stack/blob/master/exampleSite/config.toml

from hugo-theme-stack.

Reqwey avatar Reqwey commented on May 24, 2024

emm...好像还是会报这个错,顺便问下,根目录的config.toml和主题里的theme.toml有什么关系?好像有些东西既可以在前一个里面定义,又可以在后一个里面写

from hugo-theme-stack.

Reqwey avatar Reqwey commented on May 24, 2024

hugo version为

Hugo Static Site Generator v0.68.3/extended linux/amd64 BuildDate: 2020-03-25T06:15:45Z

hugo server -D为

Building sites … WARN 2020/09/06 10:20:23 found no layout file for "HTML" for kind "section": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2020/09/06 10:20:23 found no layout file for "HTML" for kind "taxonomyTerm": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2020/09/06 10:20:23 found no layout file for "HTML" for kind "taxonomyTerm": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
ERROR 2020/09/06 10:20:23 render of "home" failed: execute of template failed: template: index.html:4:7: executing "main" at <partialCached "sidebar/left.html" .>: error calling partialCached: "/home/linhk/文档/oi.lhkstudio.me/themes/stack/layouts/partials/sidebar/left.html:12:44": execute of template failed: template: partials/sidebar/left.html:12:44: executing "partials/sidebar/left.html" at <$avatar.Resize>: nil pointer evaluating resource.Resource.Resize
Total in 34 ms
Error: Error building site: failed to render pages: render of "page" failed: execute of template failed: template: _default/single.html:4:7: executing "main" at <partial "sidebar/left.html" .>: error calling partial: "/home/linhk/文档/oi.lhkstudio.me/themes/stack/layouts/partials/sidebar/left.html:12:44": execute of template failed: template: partials/sidebar/left.html:12:44: executing "partials/sidebar/left.html" at <$avatar.Resize>: nil pointer evaluating resource.Resource.Resize

from hugo-theme-stack.

Reqwey avatar Reqwey commented on May 24, 2024

啊这,似乎是个bug: https://discourse.gohugo.io/t/nil-pointer-evaluating-resource-resource-resize-in-version-0-57-0/20208/11

from hugo-theme-stack.

CaiJimmy avatar CaiJimmy commented on May 24, 2024

主题要求 Hugo 最低版本为 0.74:https://github.com/CaiJimmy/hugo-theme-stack#requirements

你指出的报错不是 Bug,是因为 assets 文件夹下找不到 config.toml 指定的 img/avatar.png。 需要在站点根目录下创建 assets/img/avatar.png。同样,这一点可以参考 exampleSite 文件夹,或者也可以直接把该文件夹下的内容复制到你站点的根目录。

通过该文件夹编译出的站点:https://hugo-theme-stack.netlify.app/

from hugo-theme-stack.

Reqwey avatar Reqwey commented on May 24, 2024

哦,感谢大佬指点,那么现在的问题就是,我的ubuntu20.04的软件源下到hugo的最新版本就是0.68.3,我得想法去换个源

from hugo-theme-stack.

CaiJimmy avatar CaiJimmy commented on May 24, 2024

哦,感谢大佬指点,那么现在的问题就是,我的ubuntu20.04的软件源下到hugo的最新版本就是0.68.3,我得想法去换个源

Snap 有最新版本:https://snapcraft.io/hugo

或者可以直接去 Hugo 的 Release 页面下载编译好的文件

from hugo-theme-stack.

Reqwey avatar Reqwey commented on May 24, 2024

谢谢,最近因为开学了有点忙,所以没有来得及测试,现在已经解决了😁

from hugo-theme-stack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.