hugo-sveltia-cms
Hugo + Sveltia CMS Skill
Two primary workflows:
- Bootstrap: New Hugo site with Sveltia CMS + Basecoat UI, deployed to Cloudflare Pages
- Convert: Migrate from TinaCMS, Decap/Netlify CMS, WordPress, Jekyll, Eleventy, or other platforms to Hugo + Sveltia CMS
Why This Stack
- Hugo — Fastest SSG, single binary, Go templates
- Sveltia CMS — Git-based headless CMS, drop-in Decap/Netlify CMS replacement with better UX and i18n. Beta, v1.0 early 2026. Same
config.ymlformat as Decap - Basecoat — shadcn/ui components without React. Tailwind CSS utility classes (
btn,card,input), minimal JS, dark mode, themeable - Cloudflare Pages — Primary deploy target. Free tier, fast CDN, Workers for OAuth
- GitHub — Only supported Git backend
Critical Knowledge
- YAML front matter only. Sveltia CMS has bugs with TOML (
+++). Always use YAML (---) and setformat: yamlon every collection. - Use
hugo.yamlnothugo.tomlfor config consistency. - Admin files in
static/admin/. Hugo copiesstatic/to build root. - Media paths.
media_folder: "static/images/uploads"(repo) →public_folder: "/images/uploads"(URL). Hugo stripsstatic/. - GitHub OAuth required. Deploy
sveltia-cms-authas a Cloudflare Worker. Netlify git-gateway NOT supported. - Always set
extension: "md"andformat: "yaml"on every folder collection. - Schema line at top of
config.yml:# yaml-language-server: $schema=https://unpkg.com/@sveltia/cms/schema/sveltia-cms.json
Workflow: Bootstrap
Step 1: Gather Requirements
Ask:
- Site purpose: Consulting/services, medical practice, blog, portfolio, docs?
- Content types: What content will they manage?
- Basecoat approach: Full Tailwind pipeline (recommended) or CDN-only prototype?
- Custom domain: For CF Pages + OAuth setup
Step 2: Scaffold Hugo + Basecoat
hugo new site <site-name> --format yaml
cd <site-name>
Read references/hugo-sveltia-setup.md § Basecoat Integration for setup details.
Production (recommended): npm init -y && npm install -D tailwindcss @tailwindcss/cli basecoat-css, create assets/css/main.css with @import "tailwindcss"; @import "basecoat-css";, wire via Hugo's css.TailwindCSS pipe.
CDN (quick start): Add CDN links to baseof.html <head>.
Step 3: Create Admin Interface
Create static/admin/index.html and static/admin/config.yml using templates/. Build collections from the domain-specific patterns in the reference file.
Step 4: Build Layouts with Basecoat Components
Create Hugo partials wrapping Basecoat classes: partials/components/card.html, button.html, badge.html, alert.html, nav.html. These accept parameters via Hugo dict and emit styled HTML.
Step 5: Create Archetypes + Seed Content
One archetype per content type in archetypes/.
Step 6: Deploy to Cloudflare Pages
- Register GitHub OAuth App → get Client ID + Secret
- Deploy
sveltia-cms-authCloudflare Worker - Connect repo to CF Pages, set
HUGO_VERSIONenv var - Build command:
hugo --minify, output:public - The bootstrap creates
.github/workflows/deploy.ymlautomatically — setCLOUDFLARE_API_TOKEN,CLOUDFLARE_ACCOUNT_IDas GitHub Secrets andPAGES_PROJECT_NAMEas a GitHub Variable
Step 7: Test Locally
Sveltia CMS detects localhost and uses File System Access API (Chromium) — no OAuth needed locally. Run hugo server, visit /admin/.
Workflow: Convert
From TinaCMS
TinaCMS uses GraphQL API + tina/config.ts schema + TinaCloud auth. Fundamentally different architecture.
Field type mapping:
TinaCMS type |
Sveltia widget |
Notes |
|---|---|---|
string |
string |
|
string + list: true |
list |
|
datetime |
datetime |
|
boolean |
boolean |
|
image |
image |
|
rich-text |
markdown |
Shortcode templates won't carry over |
object |
object |
Map subfields recursively |
reference |
relation |
Set collection, search_fields, value_field |
number |
number |
Set value_type: int or float |
Config mapping: tina/config.ts collections[].path → config.yml collections[].folder
Steps:
- Read
tina/config.{ts,js}, map each collection's fields using table above - Content files (Markdown + YAML front matter) stay as-is — Hugo reads them directly
- Delete
tina/directory, removetinacmsfrompackage.json, remove Tina build commands - Create
static/admin/with Sveltia CMS files - Map Tina media config (
mediaRoot/publicFolder) → Sveltiamedia_folder/public_folder - Document shortcodes used in content (no CMS-side visual editing for these)
- Deploy via CF Pages + GitHub OAuth
Key win: No more TinaCloud dependency, no GraphQL build step, no tina/__generated__/.
From Decap CMS / Netlify CMS
Drop-in replacement:
- Replace script tag:
<script src="https://unpkg.com/@sveltia/cms/dist/sveltia-cms.js"></script> - Existing
config.ymlworks as-is - Replace
git-gatewaywith GitHub OAuth + CF Worker - Test all collections
From WordPress
- Export via
wordpress-export-to-markdownorhugo import jekyllafter Jekyll export - Clean front matter (strip
wp_id,guid) - Map taxonomies → Hugo taxonomies
- Download media →
static/images/ - Build collections matching cleaned structure
From Jekyll
hugo import jekyll <jekyll-root> <hugo-root>(built-in)- Review front matter, add Sveltia CMS per standard workflow
From Eleventy / Other SSGs
- Copy Markdown + YAML front matter files into
content/ - Adjust for Hugo conventions (
dateformat,draftboolean) - Rebuild templates in Hugo, add Sveltia CMS
Domain-Specific Collections
Read references/hugo-sveltia-setup.md § Domain Collection Patterns for ready-made configs:
- Consulting / Services — Services, case studies, testimonials, team members
- Medical Practice — Providers, locations, services/specialties, conditions, patient resources
- Content / Blog — Posts, pages, authors, newsletter, categories
Mix and match. Each includes full field definitions.
File Checklist
-
hugo.yaml -
package.json+assets/css/main.css(Basecoat/Tailwind, if npm path) -
static/admin/index.html+static/admin/config.yml -
archetypes/— one per content type -
content/— seed or converted content -
layouts/— Basecoat-styled templates + component partials -
.github/workflows/deploy.yml— CI/CD for Cloudflare Pages -
.gitignore
Reference Files
references/hugo-sveltia-setup.md— Full config reference, domain collections, Basecoat setup, widgets, auth, CF Pages deploy, gotchas, i18ntemplates/admin-index.html— Admin page templatetemplates/config.yml— Annotated CMS config startertemplates/deploy.yml— GitHub Actions workflow for Cloudflare Pages CI/CDscripts/bootstrap-hugo-sveltia.sh— One-command scaffoldingscripts/convert-toml-to-yaml.py— Batch front matter conversion
More from baphomet480/claude-skills
kitchen-sink-design-system
Kitchen Sink design system workflow for Next.js and React projects, with secondary support for Astro, SvelteKit, Nuxt, and static HTML. Use when asked for a Kitchen Sink page, Design System, UI Audit, Style Guide, or Component Inventory, or when a project needs a component inventory plus component creation and a sink page implementation. Covers CVA variant architecture, Tailwind v3/v4 token systems, shadcn/ui integration, and TinaCMS content modeling.
40deep-research
Conduct comprehensive, multi-round research that produces rich visual reports. Use when asked for "deep research", "comprehensive analysis", "compare frameworks", "evaluate options", "research the state of X", or any task requiring investigation across 10+ sources. NOT for quick lookups — this is a 5-15 minute deep dive that produces a briefing-quality artifact with screenshots, diagrams, tables, and cited findings.
37design-lookup
Search and retrieve CSS components, SVG icons, design patterns, and visual inspiration from the web. Use when the user asks to find, look up, or search for CSS snippets, SVG icons, UI components, loading spinners, animations, design inspiration, or any visual/frontend design resource. Triggers on requests like "find me a CSS button", "look up an SVG spinner", "search for a card component", "find a wave divider SVG", or "get design inspiration for a dashboard".
34nextjs-tinacms
Build Next.js 16 + React 19 + TinaCMS sites with visual editing, blocks-based page builder, and complete SEO. Use this skill whenever the user mentions TinaCMS, Tina CMS, Next.js with a CMS, visual editing with Next.js, click-to-edit, content-managed Next.js site, blocks pattern page builder, or migrating to Next.js + TinaCMS. Also trigger for TinaCMS schema design, self-hosted TinaCMS, TinaCMS media configuration, or any TinaCMS troubleshooting. Covers Day 0-2 setup from scaffolding through production deployment on Vercel.
32cloudflare-pages
Deploy static sites to Cloudflare Pages with custom domains and CI/CD. Use when the user wants to deploy a site to Cloudflare Pages, add a custom domain to a Pages project, set up GitHub Actions CI/CD for Cloudflare Pages, roll back a deployment, or verify deployment status. Triggers on "deploy to Cloudflare", "Cloudflare Pages", "add custom domain", "pages deploy", or any Cloudflare Pages hosting workflow.
31local-ocr
Local OCR pipeline for AI agents featuring auto-rotation, deskew, and searchable PDF generation via ocrmypdf and Tesseract.
23