Agent skill
hugo-notion-publish
Convert Notion pages or drafts into Hugo content for this repo, including front matter, shortcodes, glossary terms, and asset placement, and publish/preview with the Hugo CLI. Use when asked to import from Notion, format content to match FORMATTING.md, or create/update posts in content/.
Stars
163
Forks
31
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/development/hugo-notion-publish
SKILL.md
Hugo Notion Publish
Overview
Turn Notion content into Hugo-ready Markdown and publish it in this site with the correct front matter, shortcodes, and assets.
Workflow
- Identify the target section and slug.
- Gather metadata (title, date, tags, summary, series, author, glossary terms).
- Pull the source content:
- Use Notion MCP
notion-searchto locate the page if only keywords are provided. - Use
notion-fetchwith the page URL to retrieve properties, blocks, and assets. - If Notion MCP is unavailable, ask for a Markdown or HTML export.
- Use Notion MCP
- Build front matter using
references/hugo-frontmatter.md. - Convert Notion blocks to Hugo Markdown per
references/notion-to-hugo.mdandFORMATTING.md. - Write the file and place assets.
- Preview or build with the Hugo CLI if requested.
Target locations
- Blog posts:
content/posts/<slug>.md - Images:
static/images/<slug>/...referenced as/images/<slug>/file.ext - Other sections:
content/<section>/(mirror front matter fields from existing entries).
Publishing with Hugo CLI
- Preview locally:
hugo server -D - Production build:
hugo --gc --minify - Use
hugo new <section>/slug.mdonly to scaffold; replace front matter with the site template and removedraft.
Notion MCP helpers
- Use
scripts/notion_fetch_plan.py <notion-url>to generate a minimal tool-call payload fornotion-fetch.
Formatting rules
- Shift headings down one level (Notion H1 ->
##) so the H1 is only in front matter. - Use
{{< term >}},{{< highlight-box >}},{{< collapse >}}, and{{< app >}}as defined inFORMATTING.md. - Keep tags lower-case and hyphenated; keep summaries to 1-2 sentences.
- When updating an existing post, preserve the filename/slug and
date, and setlastmod.
Quality checks
- Remove Notion artifacts (export headers, "Untitled", orphaned URLs).
- Ensure image paths resolve under
/images/<slug>/. - Summary matches the lead and is not duplicated verbatim in the first paragraph.
- Glossary terms appear in front matter or
data/glossary.yamlwhen reused across posts.
Resources
scripts/notion_fetch_plan.pyreferences/hugo-frontmatter.mdreferences/notion-to-hugo.mdFORMATTING.mdCLAUDE.md
Didn't find tool you were looking for?