Git Product home page Git Product logo

Comments (17)

sfdye avatar sfdye commented on August 20, 2024 1

@Tuanz1 谢谢 我明白了

看了下作者源代码:
https://github.com/laozhu/hugo-nuo/blob/master/layouts/partials/head.html#L85-L90

根本原因是favicon现在是hardcode成默认的,而我希望能在config.toml里面自定义这个参数。只需要在header.html里面用{{ .Site.Params.favicon }}然后提供一个默认值就好了。我有空做一个PR。

from hugo-nuo.

laozhu avatar laozhu commented on August 20, 2024 1

Solved in #119

from hugo-nuo.

wenbo5565 avatar wenbo5565 commented on August 20, 2024

I have the same question to change favicon. I use blogdown and have tried several ways but haven't made it yet. Please let me know how I can change to a new favicon. Thank you.

from hugo-nuo.

sfdye avatar sfdye commented on August 20, 2024

@laozhu

from hugo-nuo.

Tuanz1 avatar Tuanz1 commented on August 20, 2024

修改image下的文件,然后执行npm run image 应该就可以了

from hugo-nuo.

sfdye avatar sfdye commented on August 20, 2024

@Tuanz1 npm??? 这不是hugo吗

from hugo-nuo.

Tuanz1 avatar Tuanz1 commented on August 20, 2024

用的hugo框架来构建的整个网站的文件,但是缩略图什么是用npm 里面的 image 生成

from hugo-nuo.

Tuanz1 avatar Tuanz1 commented on August 20, 2024

@sfdye 你可以看他项目的readme 关于build的这一部分

from hugo-nuo.

Tuanz1 avatar Tuanz1 commented on August 20, 2024

@sfdye 你有尝试修改content.scss里面的样式么?自定义content.scss里面的内容,但是npm run sass 后还是没有变化是什么原因么

from hugo-nuo.

sfdye avatar sfdye commented on August 20, 2024

@Tuanz1 我用的是submodule安装这个theme,所有就不能用npm了,毕竟我不想修改原repo,只想通过修改config。按我刚才说的方法修改head.toml,已经可以用了。

from hugo-nuo.

tomriddle1234 avatar tomriddle1234 commented on August 20, 2024

作者用的favicon包含Android和Apple的各种版本,你需要在自己的static 目录下也制作相应的文件。或者在theme目录的static文件夹下,删除自带的各种favicon

from hugo-nuo.

wenbo5565 avatar wenbo5565 commented on August 20, 2024

@sfdye Hi, 我对hugo以及网页相关的概念不熟悉。请问可不可以详细说一下如何改head.toml?谢谢。

from hugo-nuo.

laozhu avatar laozhu commented on August 20, 2024

不使用 Webpack 构建,直接替换 static 目录下的 favicon.ico 就可以了
使用 Webpack 构建的话,替换 src/assets 目录下的 favicon.ico 然后运行 yarn build 会自动 Copy 到 static 目录下。

from hugo-nuo.

sfdye avatar sfdye commented on August 20, 2024

@laozhu 还是没有解决啊,我用的submodule直接依赖你这个repo,所以我无法直接修改favicon。

git submodule add https://github.com/laozhu/hugo-nuo themes/hugo-nuo

https://sfdye.com/post/migrate-from-jekyll-to-hugo/

from hugo-nuo.

laozhu avatar laozhu commented on August 20, 2024

@sfdye 明白了,你是希望在 config.toml 里面可以修改 favicon.ico 和其他图标,不想修改主题。我正在用 hugo pipelines 替代 npm 和 webpack 这套,我会把一些原来硬编码的配置移到 config.toml 里面的。

from hugo-nuo.

sfdye avatar sfdye commented on August 20, 2024

赞!等你更新

from hugo-nuo.

wenbo5565 avatar wenbo5565 commented on August 20, 2024

感谢

from hugo-nuo.

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.