本篇博文仅在 maupassant 主题下有效 其他主题视情况而定,应该相差不多

生成 favicon

  • 访问 favicon.io
  • 选择 PNG -> icoTEXT -> icoEmoji -> ico
  • 生成完毕点击 Download

添加 favicon 到站点

  • 解压下载文件

  • favicon.ico放入 static 文件

$ tree -L 3 ./themes
./themes
└── maupassant
   ├── LICENSE.md
   ├── archetypes
   │   └── default.md
   ├── i18n
   │   ├── en.toml
   │   ├── zh-hans.toml
   │   └── zh-hant.toml
   ├── layouts
   │   ├── 404.html
   │   ├── _default
   │   ├── archives
   │   ├── index.html
   │   ├── partials
   │   ├── search
   │   └── shortcodes
   ├── static
   │   ├── css
   │   ├── favicon.ico 	# 这里是新添加的
   │   └── js
   └── theme.toml

放入 static 目录中的 目录文件,都会被 “搬运” 到静态文件目录 public

提交代码

$ git commit -am "add favicon.ico"

部署代码

这里由于已添加 Github Workflow,提交代码后自动生成 html 并部署

该部分略过