网站抛光
首页加上Logo图像
在index.md中加入如下代码,并让AI增加了CSS样式,给图像加上漂亮的背景。 需要将logo文件放到public文件夹下。
hero:
name: "moomboss"
text: "Technology, Life & Thoughts"
tagline: Welcome to my blogs, where I document my technical explorations and life insights
image:
src: /favicon-310x310.png
alt: moomboss logo
light: /favicon-310x310.png
dark: /favicon-310x310.png加上favicon
在config.mts加上以下代码,生成favicon
head: [
['link', { rel: 'icon', href: '/favicon-16x16.png' }],图像压缩优化(失败了)
安装vite-plugin-imagemin,压缩图像,减少带宽消耗。 我失败了,没有配置成功😢。 通过AI生成脚本,可以实现png转为webp,但是dev和preview时总是不一致。 现在不处理了,有钱的时候让cloudflare处理。