[{"data":1,"prerenderedAt":527},["ShallowReactive",2],{"content:\u002F2026\u002Fblog-guide":3,"surround:\u002F2026\u002Fblog-guide":516},{"id":4,"title":5,"body":6,"categories":492,"date":494,"description":12,"draft":495,"extension":496,"image":497,"meta":498,"navigation":500,"path":501,"permalink":501,"published":502,"readingTime":503,"recommend":465,"references":502,"seo":508,"sitemap":509,"stem":510,"tags":511,"type":514,"updated":502,"__hash__":515},"content\u002Fposts\u002F2026\u002F博客使用指南.md","博客使用指南",{"type":7,"value":8,"toc":464},"minimark",[9,13,19,23,28,36,195,199,206,210,221,225,239,243,258,262,272,275,283,291,299,307,311,317,321,328,336,340,346,356,360,366,370,376,387,390,393,401,408,411,417,424,427,433,436,439,450,453],[10,11,12],"p",{},"本博客基于 Nuxt 4 + Nuxt Content 构建，采用静态生成（SSG）部署于 GitHub Pages。这篇文章帮助你快速了解各个文件和文件夹的作用，方便后续维护。",[10,14,15],{},[16,17,18],"span",{},"TOC",[20,21,22],"h2",{"id":22},"根目录配置文件",[24,25,27],"h3",{"id":26},"blogconfigts","blog.config.ts",[10,29,30,31,35],{},"博客的",[32,33,34],"strong",{},"核心配置文件","，启动时加载，修改后需重新构建才生效：",[37,38,39,52],"table",{},[40,41,42],"thead",{},[43,44,45,49],"tr",{},[46,47,48],"th",{},"字段",[46,50,51],{},"作用",[53,54,55,67,77,87,97,107,117,127,137,147,157,167,181],"tbody",{},[43,56,57,64],{},[58,59,60],"td",{},[61,62,63],"code",{"code":63},"title",[58,65,66],{},"博客标题，显示在浏览器标签页",[43,68,69,74],{},[58,70,71],{},[61,72,73],{"code":73},"subtitle",[58,75,76],{},"副标题\u002FSlogan",[43,78,79,84],{},[58,80,81],{},[61,82,83],{"code":83},"description",[58,85,86],{},"网站描述，影响 SEO",[43,88,89,94],{},[58,90,91],{},[61,92,93],{"code":93},"author.name",[58,95,96],{},"作者名",[43,98,99,104],{},[58,100,101],{},[61,102,103],{"code":103},"author.avatar",[58,105,106],{},"头像图片链接",[43,108,109,114],{},[58,110,111],{},[61,112,113],{"code":113},"author.email",[58,115,116],{},"邮箱",[43,118,119,124],{},[58,120,121],{},[61,122,123],{"code":123},"favicon",[58,125,126],{},"浏览器标签页小图标",[43,128,129,134],{},[58,130,131],{},[61,132,133],{"code":133},"url",[58,135,136],{},"博客域名，用于生成 RSS\u002FAtom 链接",[43,138,139,144],{},[58,140,141],{},[61,142,143],{"code":143},"timeEstablished",[58,145,146],{},"建站日期",[43,148,149,154],{},[58,150,151],{},[61,152,153],{"code":153},"article.categories",[58,155,156],{},"定义文章分类及对应图标和颜色",[43,158,159,164],{},[58,160,161],{},[61,162,163],{"code":163},"article.useRandomPremalink",[58,165,166],{},"新建文章时是否自动生成随机 URL",[43,168,169,174],{},[58,170,171],{},[61,172,173],{"code":173},"article.hidePostPrefix",[58,175,176,177,180],{},"是否隐藏 URL 中的 ",[61,178,179],{"code":179},"\u002Fposts"," 前缀",[43,182,183,188],{},[58,184,185],{},[61,186,187],{"code":187},"scripts",[58,189,190,191,194],{},"向 ",[61,192,193],{"code":193},"\u003Chead>"," 注入外部脚本（统计、评论等）",[24,196,198],{"id":197},"nuxtconfigts","nuxt.config.ts",[10,200,201,202,205],{},"Nuxt 框架的",[32,203,204],{},"构建配置","，控制渲染模式、SEO、模块加载等。一般不需要频繁修改，除非要添加新功能模块或修改构建行为。",[24,207,209],{"id":208},"contentconfigts","content.config.ts",[10,211,212,213,216,217,220],{},"Nuxt Content 的",[32,214,215],{},"内容定义","，声明文章的 ",[61,218,219],{"code":219},"frontmatter"," 格式（有哪些字段、什么类型）。新增自定义字段时需要在这里注册。",[24,222,224],{"id":223},"appconfigts","app.config.ts",[10,226,227,228,231,232,235,236,238],{},"前端",[32,229,230],{},"响应式运行时配置","，位于 ",[61,233,234],{"code":234},"app\u002F"," 目录下。与 ",[61,237,27],{"code":27}," 不同，这里的内容会在客户端访问，适合放页脚导航、社交链接等动态信息。",[24,240,242],{"id":241},"packagejson","package.json",[10,244,245,246,249,250,253,254,257],{},"项目依赖和脚本定义。",[61,247,248],{"code":248},"pnpm new"," 新建文章、",[61,251,252],{"code":252},"pnpm dev"," 启动开发、",[61,255,256],{"code":256},"pnpm generate"," 构建静态站。",[20,259,261],{"id":260},"app-目录-前端代码","app 目录 —— 前端代码",[263,264,269],"pre",{"className":265,"code":267,"language":268},[266],"language-text","app\u002F\n├── app.vue              # 根布局组件\n├── app.config.ts        # 前端运行时配置\n├── feeds.ts             # 友链列表 ★\n├── assets\u002F              # 需编译的资源（SCSS、字体等）\n├── components\u002F          # Vue 组件\n│   ├── blog\u002F            # 博客整体布局（头部、侧栏、页脚）\n│   ├── content\u002F         # MDC 组件（Markdown 增强渲染）\n│   ├── partial\u002F         # 微型复用组件（按钮、输入框等）\n│   ├── post\u002F            # 文章相关组件（卡片、轮播）\n│   └── widget\u002F          # 侧栏小组件（技术信息、统计、目录）\n├── composables\u002F         # Vue 组合式函数（公共逻辑）\n├── pages\u002F               # 页面路由\n│   ├── index.vue        # 首页\n│   ├── archive.vue      # 归档页\n│   ├── link.vue         # 友链页\n│   ├── preview.vue      # 预览文章列表\n│   └── [...slug].vue    # 文章正文 & 404 页面\n├── plugins\u002F             # Nuxt\u002FVue 插件\n├── stores\u002F              # Pinia 状态管理\n├── types\u002F               # TypeScript 类型定义\n└── utils\u002F               # 工具函数\n","text",[61,270,267],{"__ignoreMap":271},"",[24,273,274],{"id":274},"关键文件说明",[10,276,277,282],{},[32,278,279],{},[61,280,281],{"code":281},"feeds.ts","：友链列表文件，定义了你博客上展示的友链分组和每个友链的信息。格式如下：",[263,284,289],{"className":285,"code":287,"language":288,"meta":271},[286],"language-ts","{\n  author: '友链作者名',\n  title: '博客标题',\n  desc: '博客描述',\n  link: 'https:\u002F\u002Fexample.com',\n  icon: '头像URL',\n  avatar: '头像URL',\n  date: '添加日期',\n  comment: '备注',\n}\n","ts",[61,290,287],{"__ignoreMap":271},[10,292,293,298],{},[32,294,295],{},[61,296,297],{"code":297},"pages\u002Findex.vue","：首页逻辑，控制文章排序、分类筛选、分页、精选文章轮播。",[10,300,301,306],{},[32,302,303],{},[61,304,305],{"code":305},"pages\u002F[...slug].vue","：万能路由，匹配所有文章路径和未定义的页面（404）。",[20,308,310],{"id":309},"content-目录-文章存储","content 目录 —— 文章存储",[263,312,315],{"className":313,"code":314,"language":268},[266],"content\u002F\n├── posts\u002F           # 正式文章（会被收录、展示在首页）\n├── previews\u002F        # 草稿\u002F预览文章（仅站内搜索可见，不在首页展示）\n├── link.md          # 友链页说明文字\n└── theme.md         # 主题介绍页\n",[61,316,314],{"__ignoreMap":271},[24,318,320],{"id":319},"文章-frontmatter-字段","文章 Frontmatter 字段",[10,322,323,324,327],{},"每篇文章顶部的 ",[61,325,326],{"code":326},"---"," 之间是元数据：",[263,329,334],{"className":330,"code":332,"language":333,"meta":271},[331],"language-yaml","---\ntitle: 文章标题\ndate: 2026-06-07 12:00:00\ncategories: [安全]          # 对应 blog.config.ts 中定义的分类\ntags: [CTF, SQL注入]        # 标签\nimage: \"\u002Fimages\u002F封面.png\"   # 封面图，推荐 16:9 或 2:1\nrecommend: 1               # 数值越大越靠前，设置后在首页轮播展示\npermalink: \u002F2026\u002Fcustom    # 自定义 URL，不设则用文件路径\ndraft: false               # 设为 true 则不发布\n---\n","yaml",[61,335,332],{"__ignoreMap":271},[20,337,339],{"id":338},"public-目录-静态资源","public 目录 —— 静态资源",[263,341,344],{"className":342,"code":343,"language":268},[266],"public\u002F\n├── images\u002F      # 图片资源\n├── fonts\u002F       # 字体文件\n└── assets\u002F      # 其他静态文件（RSS XSLT 等）\n",[61,345,343],{"__ignoreMap":271},[10,347,348,351,352,355],{},[61,349,350],{"code":350},"public"," 目录下的文件会原样复制到站点根目录。引用时路径为 ",[61,353,354],{"code":354},"\u002Fimages\u002F文件名.png"," 或直接使用外部图床链接。",[20,357,359],{"id":358},"server-目录-后端接口","server 目录 —— 后端接口",[263,361,364],{"className":362,"code":363,"language":268},[266],"server\u002F\n├── api\u002F\n│   └── stats.get.ts   # \u002Fapi\u002Fstats 博客统计接口\n└── routes\u002F\n    ├── atom.xml.get.ts   # Atom 订阅源\n    └── zhilu.opml.get.ts # OPML 友链订阅聚合\n",[61,365,363],{"__ignoreMap":271},[20,367,369],{"id":368},"githubworkflows-自动部署",".github\u002Fworkflows —— 自动部署",[263,371,374],{"className":372,"code":373,"language":268},[266],".github\u002Fworkflows\u002F\n└── pages.yml        # GitHub Actions 构建部署脚本\n",[61,375,373],{"__ignoreMap":271},[10,377,378,379,382,383,386],{},"每次 ",[61,380,381],{"code":381},"git push"," 到 ",[61,384,385],{"code":385},"main"," 分支时自动触发：安装依赖 → 构建静态站 → 部署到 GitHub Pages。",[20,388,389],{"id":389},"常用操作",[24,391,392],{"id":392},"新建文章",[263,394,399],{"className":395,"code":397,"language":398,"meta":271},[396],"language-bash","pnpm new\n","bash",[61,400,397],{"__ignoreMap":271},[10,402,403,404,407],{},"自动在 ",[61,405,406],{"code":406},"content\u002Fposts\u002F"," 下生成模板文件，填写 frontmatter 和内容即可。",[24,409,410],{"id":410},"本地预览",[263,412,415],{"className":413,"code":414,"language":398,"meta":271},[396],"pnpm dev\n",[61,416,414],{"__ignoreMap":271},[10,418,419,420,423],{},"浏览器打开 ",[61,421,422],{"code":422},"http:\u002F\u002Flocalhost:3000","，修改文章后自动热更新。",[24,425,426],{"id":426},"发布上线",[263,428,431],{"className":429,"code":430,"language":398,"meta":271},[396],"git add -A\ngit commit -m \"描述你的改动\"\ngit push origin main\n",[61,432,430],{"__ignoreMap":271},[10,434,435],{},"推送后 GitHub Actions 自动构建部署，约 2 分钟后生效。",[24,437,438],{"id":438},"修改友链",[10,440,441,442,445,446,449],{},"编辑 ",[61,443,444],{"code":444},"app\u002Ffeeds.ts","，在对应分组的 ",[61,447,448],{"code":448},"entries"," 数组中添加或修改友链对象。",[24,451,452],{"id":452},"更换图片",[10,454,455,456,459,460,463],{},"推荐上传到博客园图床（或任意图床），拿到直链后在文章 frontmatter 的 ",[61,457,458],{"code":458},"image"," 字段或用 ",[61,461,462],{"code":462},"![](URL)"," 引用。",{"title":271,"searchDepth":465,"depth":465,"links":466},4,[467,476,479,482,483,484,485],{"id":22,"depth":468,"text":22,"children":469},2,[470,472,473,474,475],{"id":26,"depth":471,"text":27},3,{"id":197,"depth":471,"text":198},{"id":208,"depth":471,"text":209},{"id":223,"depth":471,"text":224},{"id":241,"depth":471,"text":242},{"id":260,"depth":468,"text":261,"children":477},[478],{"id":274,"depth":471,"text":274},{"id":309,"depth":468,"text":310,"children":480},[481],{"id":319,"depth":471,"text":320},{"id":338,"depth":468,"text":339},{"id":358,"depth":468,"text":359},{"id":368,"depth":468,"text":369},{"id":389,"depth":468,"text":389,"children":486},[487,488,489,490,491],{"id":392,"depth":471,"text":392},{"id":410,"depth":471,"text":410},{"id":426,"depth":471,"text":426},{"id":438,"depth":471,"text":438},{"id":452,"depth":471,"text":452},[493],"技术","2026-06-07 12:00:00",false,"md","https:\u002F\u002Fimg2024.cnblogs.com\u002Fblog\u002F3838669\u002F202608\u002F3838669-20260807235936634-1049401948.png",{"slots":499},{},true,"\u002F2026\u002Fblog-guide",null,{"text":504,"minutes":505,"time":506,"words":507},"6 min read",5.81,348600,1162,{"title":5,"description":12},{"loc":501},"posts\u002F2026\u002F博客使用指南",[512,513],"博客","教程","tech","iOQR6AYUhFLV9hiYDdYXm31M0maACbZKqZDcdA5d_8k",[517,522],{"title":518,"path":519,"stem":520,"date":521,"type":514,"children":-1},"工具盘点","\u002F2026\u002Ftool-review","posts\u002F2026\u002F网安工具大盘点","2026-06-07 10:00:00",{"title":523,"path":524,"stem":525,"date":526,"type":514,"children":-1},"web一部分总结","\u002F2026\u002Fweb-partial-summary","posts\u002F2026\u002F部分web总结","2026-06-09 02:10:00",1786192764714]