Comments (17)
@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.
Solved in #119
from hugo-nuo.
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.
from hugo-nuo.
修改image下的文件,然后执行npm run image 应该就可以了
from hugo-nuo.
@Tuanz1 npm??? 这不是hugo吗
from hugo-nuo.
用的hugo框架来构建的整个网站的文件,但是缩略图什么是用npm 里面的 image 生成
from hugo-nuo.
@sfdye 你可以看他项目的readme 关于build的这一部分
from hugo-nuo.
@sfdye 你有尝试修改content.scss里面的样式么?自定义content.scss里面的内容,但是npm run sass 后还是没有变化是什么原因么
from hugo-nuo.
@Tuanz1 我用的是submodule安装这个theme,所有就不能用npm了,毕竟我不想修改原repo,只想通过修改config。按我刚才说的方法修改head.toml
,已经可以用了。
from hugo-nuo.
作者用的favicon包含Android和Apple的各种版本,你需要在自己的static 目录下也制作相应的文件。或者在theme目录的static文件夹下,删除自带的各种favicon
from hugo-nuo.
@sfdye Hi, 我对hugo以及网页相关的概念不熟悉。请问可不可以详细说一下如何改head.toml?谢谢。
from hugo-nuo.
不使用 Webpack 构建,直接替换 static 目录下的 favicon.ico 就可以了
使用 Webpack 构建的话,替换 src/assets 目录下的 favicon.ico 然后运行 yarn build 会自动 Copy 到 static 目录下。
from hugo-nuo.
@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.
@sfdye 明白了,你是希望在 config.toml
里面可以修改 favicon.ico 和其他图标,不想修改主题。我正在用 hugo pipelines 替代 npm 和 webpack 这套,我会把一些原来硬编码的配置移到 config.toml
里面的。
from hugo-nuo.
赞!等你更新
from hugo-nuo.
感谢
from hugo-nuo.
Related Issues (20)
- Align title flush with top-of-page on mobile
- Please make logo rotation optional HOT 1
- Consider clicking logo or title mean "go back to home page" HOT 1
- Changing theme to hugo-nuo unable to deploy on Netlify. HOT 2
- Can you add a search function in your hugo theme
- Page's .Hugo is deprecated. Use the global hugo function HOT 1
- [version]this feature is not available in your current Hugo version HOT 2
- [feature] Custom home layout
- change code snippet highlight theme
- the tweet shortcode cann't work HOT 2
- chrome plugin install? HOT 2
- 主页显示一个叫做Posts的连接,而不是文章列表 HOT 9
- social communication parameter modify request
- summary post problems HOT 1
- server start failed
- grey-prism.svg can't show
- 无法设置微信头像 HOT 1
- 代码块无法渲染 HOT 2
- 不知名故障 HOT 1
- Updating old Google Analytics tag (analytics.js) to the latest tag (gtag.js)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hugo-nuo.