Wjs Publishing Hugo logo

Wjs Publishing Hugo

Community
jianshuo
wjs-publishing-hugo

当用户想给自己的 Hugo 静态博客(如 maggiacito.com)新增或编辑帖子、管理类目、上传图片并发布上线时使用——对话式后台,说一句就改文件、commit、推送、自动部署,不需要任何 CMS/服务器。触发词:「发一篇博客」「给 Hugo 加文章」「写篇帖子到博客」「管理博客类目」「上传图片到博客」「博客后台」「/wjs-publishing-hugo」。

Overview

Publisherjianshuo
Repositoryclaude-skills
Skill namewjs-publishing-hugo
Stars
137
Forks
22
Bundled files
4
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 4 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by jianshuo on GitHub. Read the source before you install it.

Installation

Install the Wjs Publishing Hugo AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/jianshuo/claude-skills/tree/main/wjs-publishing-hugo
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/jianshuo/claude-skills.git /tmp/claude-skills
mkdir -p .claude/skills
cp -r /tmp/claude-skills/wjs-publishing-hugo .claude/skills/wjs-publishing-hugo
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Wjs Publishing Hugo in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Wjs Publishing Hugo on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Wjs Publishing Hugo is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

wjs-publishing-hugo

Hugo 博客的对话式后台。我就是后台——没有 CMS、没有 /admin 页面、没有 PAT、没有 Cloudflare。 你说要发什么,我按仓库约定改 content/、放图、commit、push,走仓库现有部署流自动上线。

适用:maggiacito.com 这类 Hugo 站(content/posts/*.md + categories/tags taxonomy + GitHub Pages Actions 部署)。其它 Hugo 仓库也能用,先按下面「前置检测」对齐约定。

前置检测(每次开工先做)

  1. 确认在 Hugo 仓库根:有 hugo.toml(或 config.toml)和 content/。不在就让用户给路径。
  2. 读 hugo.toml:拿 timeZone、[taxonomies](确认 categories/tags)。
  3. 看一篇现有帖子的 front matter(content/posts/ 里随便挑一篇),确认字段与下面「权威格式」一致; 不一致就以仓库现状为准,别套用本文档的默认。

帖子的权威格式(maggiacito 现状)

文件:content/posts/<slug>.md。front matter 严格如下,日期用 YYYY-MM-DD HH:MM:SS(Asia/Shanghai):

---
title: "标题"
date: 2026-06-04 21:30:00
lastmod: 2026-06-04 21:30:00
categories: ["知天命"]
tags: []
url: /知天命/标题/
---

正文 markdown……
  • url 显式写 /<主类目>/<标题或slug>/(沿用 WordPress 迁来的链接风格;类目和标题可含中文)。
  • categories / tags 是字符串数组,可空 []。
  • 不要手写 front matter——用 scripts/new-post.py 生成,格式才不会漂。

工作流

1. 新增帖子

拿到标题 + 正文(用户给草稿/链接/零散思路都行;要润色按需润),选好类目,然后:

echo "<正文 markdown>" | python3 <SKILL_DIR>/scripts/new-post.py \
  --repo <仓库根> --title "标题" --category "知天命" --slug 可选英文slug

脚本生成 content/posts/<slug>.md 并打印路径。不传 --slug 时按标题派生文件名(中文也行,文件名读者看不到)。 不传 --url 时默认 /<首个类目>/<标题或slug>/。需要别的链接用 --url 覆盖。

2. 编辑帖子

直接改对应 content/posts/*.md:改正文随意;改了内容把 lastmod 更新成当前时间,date 不动。

3. 管理类目

  • 先列现有类目给用户挑(避免造重复):bash <SKILL_DIR>/scripts/categories.sh <仓库根>
  • 新类目:现场加进帖子的 categories[] 即可,Hugo taxonomy 自动建 /categories/<名>/ 页,无需别的配置。
  • 改名/合并类目:扫所有 content/posts/*.md 的 categories[] 批量替换(这是 CMS 做不到、我能做的)。改完提醒用户旧的 /categories/<旧名>/ 链接会失效。

4. 上传图片

新图放 static/uploads/<年>/(served 为 /uploads/...);老的 static/wp-content/uploads/ 不动。

python3 <SKILL_DIR>/scripts/add-image.py <本地图片> --repo <仓库根> --alt "说明"

打印一行 markdown 图片链接,插进正文。超 2000px 宽的图会用 macOS sips 自动缩小。

5. 发布上线

本地预览(可选):hugo server -D → 看 http://localhost:1313 。 确认后发布:

bash <SKILL_DIR>/scripts/publish.sh "post: <标题>" <仓库根>

普通用户的 git push 会触发 deploy.yml(on: push)构建上线——只有反馈机器人那种 GITHUB_TOKEN 推送才会被 GitHub 防递归挡掉,你自己推不受影响。push 完可 gh run watch 看部署。

范围(YAGNI)

只做:新增/编辑帖子、管理类目、上传图片、发布。不做评论、用户管理、草稿工作流、定时发布。

常见错误

  • ❌ 手写 front matter 导致日期格式/字段漂移 → ✅ 一律走 new-post.py。
  • ❌ 图片塞进 static/wp-content/uploads/(那是迁移来的历史目录)→ ✅ 新图进 static/uploads/。
  • ❌ 改了帖子忘了更 lastmod → ✅ 编辑后同步 lastmod。
  • ❌ 造了和现有同名/近义的类目 → ✅ 先 categories.sh 看一遍再定。
  • ❌ 以为 push 不会自动部署(被反馈闭环那条 GITHUB_TOKEN 限制误导)→ ✅ 你本人 push 会触发 deploy.yml。
  • ❌ 设了会撞车的 url(和已有帖子重复)→ ✅ 用 categories.sh/grep 查重,必要时 --url 指定唯一路径。

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Wjs Publishing Hugo AI skill do?

当用户想给自己的 Hugo 静态博客(如 maggiacito.com)新增或编辑帖子、管理类目、上传图片并发布上线时使用——对话式后台,说一句就改文件、commit、推送、自动部署,不需要任何 CMS/服务器。触发词:「发一篇博客」「给 Hugo 加文章」「写篇帖子到博客」「管理博客类目」「上传图片到博客」「博客后台」「/wjs-publishing-hugo」。

Why use Wjs Publishing Hugo on TypingMind?

Because you install it once and use it with any model. Wjs Publishing Hugo is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Wjs Publishing Hugo in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/jianshuo/claude-skills/tree/main/wjs-publishing-hugo. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Wjs Publishing Hugo?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Wjs Publishing Hugo?

As many as you like. As long as a model supports skills, you can use Wjs Publishing Hugo with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Wjs Publishing Hugo AI skill free?

Yes. It is published on GitHub by jianshuo under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇