diff --git a/public/apple-icon.png b/public/apple-icon.png deleted file mode 100644 index bbb666b..0000000 Binary files a/public/apple-icon.png and /dev/null differ diff --git a/public/favicon/android-chrome-192x192.png b/public/favicon/android-chrome-192x192.png new file mode 100644 index 0000000..3ba3ec2 Binary files /dev/null and b/public/favicon/android-chrome-192x192.png differ diff --git a/public/favicon/android-chrome-512x512.png b/public/favicon/android-chrome-512x512.png new file mode 100644 index 0000000..d348706 Binary files /dev/null and b/public/favicon/android-chrome-512x512.png differ diff --git a/public/favicon/apple-touch-icon.png b/public/favicon/apple-touch-icon.png new file mode 100644 index 0000000..b9adbd8 Binary files /dev/null and b/public/favicon/apple-touch-icon.png differ diff --git a/public/favicon/favicon-16x16.png b/public/favicon/favicon-16x16.png new file mode 100644 index 0000000..2054600 Binary files /dev/null and b/public/favicon/favicon-16x16.png differ diff --git a/public/favicon/favicon-32x32.png b/public/favicon/favicon-32x32.png new file mode 100644 index 0000000..3fa67ed Binary files /dev/null and b/public/favicon/favicon-32x32.png differ diff --git a/public/favicon/favicon.ico b/public/favicon/favicon.ico new file mode 100644 index 0000000..b1bca8e Binary files /dev/null and b/public/favicon/favicon.ico differ diff --git a/public/icon-dark-32x32.png b/public/icon-dark-32x32.png deleted file mode 100644 index fce9b80..0000000 Binary files a/public/icon-dark-32x32.png and /dev/null differ diff --git a/public/icon-light-32x32.png b/public/icon-light-32x32.png deleted file mode 100644 index 327ee0b..0000000 Binary files a/public/icon-light-32x32.png and /dev/null differ diff --git a/public/icon.svg b/public/icon.svg deleted file mode 100644 index b636504..0000000 --- a/public/icon.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/scripts/new-post.mjs b/scripts/new-post.mjs index 36a68be..02357e5 100644 --- a/scripts/new-post.mjs +++ b/scripts/new-post.mjs @@ -4,7 +4,7 @@ * pnpm new-post "文章标题" * pnpm new-post "树莓派装 Docker" --category 教程 --tags Docker,树莓派 * pnpm new-post "读《XX》有感" --category 思考 --description "摘要" --pinned - * pnpm new-post "标题" --file my-custom-slug --category 建站 + * pnpm new-post "标题" --file 文件名 --slug my-custom-slug --category 建站 * * 不加 --category 时文件放在 src/content/posts/ 根目录; * 加了则同时写进 frontmatter 的 category 并放进同名子目录,和现有文章结构一致。 @@ -38,6 +38,7 @@ if (args.length === 0 || args[0] === "--help" || args[0] === "-h") { --category <分类> 分类名,同时决定存放的子目录 --file <文件名> 自定义文件名(默认用标题) --tags <标签,标签> 标签,逗号分隔 + --slug <英文主题> 通常使用文章标题的英文缩写,Astro博客自带的属性 --description <摘要> 摘要,用于 SEO 和列表卡片 --image <路径> 封面图,public 下的绝对路径 --pinned 置顶 diff --git a/scripts/new-thought.mjs b/scripts/new-thought.mjs index 2fd8c69..f6af1af 100644 --- a/scripts/new-thought.mjs +++ b/scripts/new-thought.mjs @@ -47,7 +47,7 @@ if (args.length === 0 || args[0] === "--help" || args[0] === "-h") { --title <标题> 可选标题 --location <地点> 地点,显示在日期旁 --weather <天气> 天气,与地点一起显示 - --images <路径,路径> 配图,public 下的绝对路径,逗号分隔 + --images <路径,路径> 配图,public 下的绝对路径,逗号分隔,或者使用图床url链接 --tags <标签,标签> 标签,逗号分隔 --pinned 置顶 diff --git a/src/components/footer.astro b/src/components/footer.astro index 2a5d11b..d33fce9 100644 --- a/src/components/footer.astro +++ b/src/components/footer.astro @@ -142,7 +142,7 @@ const statCells = [ rel="noreferrer" class="flex items-center gap-2 text-muted-foreground text-xs hover:text-foreground transition-colors duration-200 group md:justify-end md:pr-4" > - + 博客主题:朱墨留白 | VermilionVoid diff --git a/src/content/posts/思考/IMG_20260915_210100.avif b/src/content/posts/思考/IMG_20260915_210100.avif deleted file mode 100644 index d6b9eeb..0000000 Binary files a/src/content/posts/思考/IMG_20260915_210100.avif and /dev/null differ diff --git a/src/content/posts/思考/工作效率的提升.md b/src/content/posts/思考/工作效率的提升.md new file mode 100644 index 0000000..10eb25f --- /dev/null +++ b/src/content/posts/思考/工作效率的提升.md @@ -0,0 +1,10 @@ +--- +title: "工作效率的提升" +published: 2026-09-20 +description: "我们这个时代为什么越来越繁忙,人工智能带来的增效仍然是一把双刃剑" +slug: Improving-work-efficiency +tags: [工作,人的异化] +category: "思考" +--- + +在这里写正文。 diff --git a/src/data/site.ts b/src/data/site.ts index 53a91f5..c8a7c0c 100644 --- a/src/data/site.ts +++ b/src/data/site.ts @@ -48,6 +48,48 @@ export const siteTitleSuffix = site.name /** 站点头像/站点图标的绝对地址,供友链页等对外展示用 */ export const siteAvatarUrl = `${site.url}/avatar.webp` +/** + * 站点图标(favicon)配置。 + * + * 换图标有两种做法: + * 1. 图省事:直接覆盖 public/favicon/ 下的同名文件,本文件一个字都不用改; + * 2. 换了文件名或目录:只改下面这些值,页面里的 和 Web App Manifest 会一起跟上。 + * + * dir 对应 public/ 下的目录,在线上就是站根下的绝对路径。 + */ +export const favicon = { + /** 图标目录。改了要同步把 src/pages/favicon/ 这个路由目录挪到同名位置 */ + dir: "/favicon", + + /** 标签页图标:老的 .ico 兜底,内含 16/32/48 三档 */ + ico: "favicon.ico", + /** 标签页主图标 32x32 —— 浏览器最常取的就是它 */ + png32: "favicon-32x32.png", + /** 标签页小图标 16x16 */ + png16: "favicon-16x16.png", + /** iOS「添加到主屏幕」图标,180x180 */ + appleTouchIcon: "apple-touch-icon.png", + + /** + * Web App Manifest:只在「添加到主屏幕 / 装成 App」时被浏览器取用。 + * 文件不在 public/ 里,而是由 src/pages/favicon/[manifest].ts 按本配置生成, + * 所以站名、图标路径不会和这里对不上。 + */ + manifest: { + /** 生成的文件名。改这里, 和产物文件名一起变 */ + file: "site.webmanifest", + /** Android「添加到主屏幕」用的两档图标 */ + android192: "android-chrome-192x192.png", + android512: "android-chrome-512x512.png", + /** 移动端状态栏与启动屏配色 */ + themeColor: "#ffffff", + backgroundColor: "#ffffff", + }, +} as const + +/** 把 favicon 里的文件名拼成站内绝对路径,例如 /favicon/favicon.ico */ +export const faviconUrl = (file: string) => `${favicon.dir}/${file}` + /** * 统计分析。每一项留空即不加载对应的脚本。 */ diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index fc722cd..da39594 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -5,7 +5,7 @@ import "katex/dist/katex.min.css" import "@/styles/global.css" import { ClientRouter } from "astro:transitions" -import { analytics, homeTitle, site } from "@/data/site" +import { analytics, favicon, faviconUrl, homeTitle, site } from "@/data/site" import ImageLightbox from "@/components/ImageLightbox.astro" interface Props { @@ -91,10 +91,11 @@ const resolvedTwitterDescription = twitterDescription || description ? "https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..700;1,400..700&family=Noto+Serif+SC:wght@400..900&display=swap" : "https://fonts.googleapis.com/css2?family=Inter:wght@400..700&family=Noto+Sans+SC:wght@400..700&family=Playfair+Display:ital,wght@0,400..700;1,400..700&family=Noto+Serif+SC:wght@400..900&display=swap"} /> - - - - + + + + +