Creating a Content Repository
About 825 wordsAbout 3 min
2026-09-01
You can move content out of an existing theme repo or start from the official template.
Both produce the same directory structure; the only difference is what the initial content is.
| Method | Best for | Retains existing posts |
|---|---|---|
content:eject | Already wrote posts in the theme repo | Yes, posts and configuration move together |
| Clone template | Starting from scratch | No, contains sample content only |
Option 1: move content out of the theme repo
Run this command from the theme repo root. Preview the plan first, then apply:
pnpm content:eject # print the plan without modifying files
pnpm content:eject --yes # write to ../shirone-content by defaultCommit your work first
content:eject modifies .gitignore and the Git index. It refuses to run when the working tree has uncommitted changes.
Commit or stash your changes before running the command.
Use --out to specify a different directory:
pnpm content:eject --yes --out ../my-blog-contentOn Windows PowerShell, use pnpm.cmd.
The command executes five actions:
- Copies
src/content/,src/data/,src/assets/, andpublic/to the target directory. - Generates
config/site.yaml,config/profile.yaml, andfooter.htmlfrom the current site configuration. Other domains remain default. - Writes
shirone.content.jsonin the theme repo root, pointing the content source to the target directory. - Appends ignore rules to
.gitignoreand untracks these files from the Git index. Local files remain on disk. - Writes
shirone.content.json, a README, and.github/workflows/trigger-build.ymlin the content repo.
Commit this change in the theme repo:
git add -A
git commit -m "chore: switch to a dual-repo setup"Local files are not deleted.
pnpm devstill works as expected. The only difference is that the theme repo no longer tracks these files.
Push to GitHub
Create an empty private repository on GitHub. Do not initialize it with a README,
.gitignore, or license.Enter the exported directory and push:
cd ../shirone-content
git init -b main
git add .
git commit -m "chore: initialize content repository"
git remote add origin git@github.com:YOUR_NAME/my-blog-content.git
git push -u origin main
After creation, GitHub shows the quick-start page for the empty repository:

Caution
The repository must be private. A public repository exposes drafts, original photos, and site configuration.
Option 2: start from the official template
Create an empty private repository on GitHub.
Clone the official template and point its remote URL to your repository:
git clone https://github.com/LyraVoid/Shirone-Content.git my-blog-content
cd my-blog-content
git remote set-url origin git@github.com:YOUR_NAME/my-blog-content.git
git remote -v
git push -u origin mainThe template includes sample posts, sample images, and complete configuration files. Replace them as needed.
Refresh the GitHub repository page after pushing — the full directory layout is in place:

Content repo layout and mapping
Content repo and its targets in the theme repo
config# site config, compiled into src/user/user-config.ts
site.yaml# site name, URL, theme color, banner
profile.yaml# avatar, name, social links
nav-bar.yaml# top navigation
sidebar.yaml# sidebar layout and widgets
...# other domains, see Configuration Overlay
content# posts and page copy, mapped to src/content/
posts# blog posts
…
moments# short posts
…
series# series
…
spec# about and friends page copy
…
data# structured data, mapped to src/data/
projects.ts# projects
friends.ts# friend links
skills.ts# skills
...
assets# images to optimize, mapped to src/assets/
images
…
public# files served as-is, mapped to public/
images
…
assets
…
shirone.content.json# repo metadata (not read by the theme)
Important details:
The
assets/directory can be deleted entirely; the site then falls back to the theme's default images.If you keep it, include every image the site references (banner, avatar, covers). A folder containing only a placeholder breaks image loading.
shirone.content.jsonin the content repo only describes the repository itself. It is not used during the build. The file that selects the content source lives in the theme repo root. See Content Sources.docs/,.github/,.vscode/, andscripts/are not copied to the theme repo, so placing them in the content repo will not impact the build.
Verify
In the theme repo, run these in order:
- Check the content source connection
pnpm content:statusThe output shows the content source type, path or Git URL, and the resolved commit SHA.
external means the content repo is connected; local means the theme's own content is still in use.
- Run a sync
pnpm content:syncThe command prints the number of files synced and the content commit SHA.
Next steps
Local Preview & Debugging: verify posts render properly before writing regularly.
Copyright
Copyright Ownership:Dawn6666666
License under:Attribution 4.0 International (CC-BY-4.0)