logo
0
0
WeChat Login

Hexo Skill

一份给 AI 编码助手用的 Hexo 博客操作技能包 (Skill),按 VS Code / GitHub Copilot 的 Skill 规范组织。

核心理念:File-first。AI 在很多场景下没有 hexo-cli 或 Node.js 环境,本 skill 把所有任务都给出『直接编辑仓库文件』与『CLI』两条等价路径,确保在纯文件操作下也能完成写作、配置、主题、部署等工作。

目录结构

. ├── SKILL.md # 入口:description + 核心方法 + 任务清单 + 工作流 + 陷阱 └── references/ # 进阶参考,按需读取 ├── themes-templates.md # 主题结构 / Layout / Partial / Fragment Cache ├── variables.md # 模板变量 site / page / config / theme ├── helpers.md # 全部模板 helper(URL/HTML/条件/字符串/日期/列表/toc/open_graph…) ├── i18n.md # 多语言 __() / _p() / i18n_dir ├── syntax-highlight.md # highlight.js & PrismJS 配置 ├── data-files.md # source/_data 数据文件 ├── server-and-generate.md # hexo-server / hexo generate ├── plugins.md # scripts vs npm 包 / API 钩子 / 常装插件 ├── migration.md # RSS / Jekyll / WordPress / Joomla 迁入 ├── deploy-pages.md # GitHub Actions Pages + GitLab Pages CI └── troubleshooting.md # EMFILE/ENOSPC/Nunjucks/YAMLException/大小写冲突…

覆盖的任务

  • 新建 / 编辑文章、草稿、独立页面,发布草稿
  • 修改 Front-matter(title / date / categories / tags / permalink / layout / disableNunjucks…)
  • 调整 _config.yml:永久链接、时区、source_dirpost_asset_folderinclude / exclude / ignore、子路径 url+root
  • 文章资源管理(post_asset_folder + {% asset_img %}
  • Hexo 标签插件(codeblock / pullquote / iframe / img / link / post_link / asset_path / raw 等)
  • 脚手架 scaffolds/<layout>.md
  • 部署:hexo-deployer-{git,heroku,rsync,ftpsync,sftp},环境变量引用 token
  • 主题:layout 回退链、partial、fragment_cache、主题级 _config.yml
  • 模板变量与 Helper(仅模板可用)
  • i18n、代码高亮(v7+ 与旧版本两套 schema)
  • source/_data 数据文件
  • 写 Hexo 插件(filter / generator / tag / helper / deployer / migrator…)
  • 从 Jekyll / WordPress / Joomla / RSS 迁入
  • GitHub Pages(Actions workflow)与 GitLab Pages(CI)部署
  • 常见报错排查

用法

把本仓库作为 Skill 引入到你的 VS Code / Copilot 工作区即可。Agent 在识别到 Hexo 仓库(根目录有 _config.yml + package.jsonhexo 依赖 + source/_posts/)或用户提到 Hexo 相关任务时,会自动读取 SKILL.md,再按需打开 references/ 下的子文档。

如要在本地直接阅读,从 SKILL.md 开始即可。

参考

License

MIT

About

hexo skill

124.00 KiB
Skills
0 forks0 stars1 branches0 TagREADMEMIT license