Managing content in the admin UI
The content editor is Sveltia CMS. It runs beside the dev server and edits the same Markdown files that live in git.
Open it
Start the dev server and go to http://localhost:4321/admin/index.html in
Chrome, Edge or Brave — the full filename, not /admin/. Click Work with
Local Repository and pick the repository root.
The sidebar lists three collections:
- Pages · Guides —
src/content/docs/<locale>/guides/. - Pages · Reference —
src/content/docs/<locale>/reference/. - Blog posts —
src/content/blog/<locale>/.
Create a post
- Pick Blog posts, then New entry.
- Type a title. The slug is filled in for you, and you can edit it.
- Fill in the description, the publish date and the tags.
- Write the body in the editor. It saves as normal Markdown.
- Press Create. The file appears in
src/content/blog/en/.
Leave Draft ticked while the post is unfinished. Drafts show up in
npm run dev and are skipped by npm run build.
Translate it
You do not create a second entry. Every entry opens with all three languages side by side, so type the Chinese title next to the English one and one save writes both files.
Some fields are shared rather than translated — the publish date, the author, the tags. Those show as read-only outside English, because English owns the value.
Commit the change
The editor writes files, it does not commit them:
git statusgit add src/content/bloggit commit -m "blog: add post about the editor"Pointed at a GitLab project instead of your working copy, a save becomes a branch and a merge request for someone to review.
One thing to watch
The editor only keeps the frontmatter fields listed in
public/admin/config.yml. If you add a field by hand and it is not in that
file, the next save in the editor removes it.
That file is generated, so the fix is to add the field to
src/lib/blog-schema.ts (posts) or src/lib/docs-schema.ts (pages) and run
npm run sveltia:config. npm run validate fails if you forget.

