Separate Directories Setup
The separate-directories layout keeps an Obsidian vault and the site code in one repository, but in different folders. The vault stays a normal Markdown folder while site/ contains the Riebeckite project.
Official sample: Rerurate514/riebeckite-e2e-directories — directories.riebeckite.dev
my-project/
├── vault/
│ ├── index.md
│ ├── notes/
│ └── assets/
├── site/
│ ├── app/
│ ├── riebeckite.config.ts
│ ├── package.json
│ └── wrangler.jsonc
└── .github/workflows/publish.yml
1. Create the site
From the repository root:
npx create-riebeckite site --preset starter --github-actions
cd site
npm install
2. Move the content into the vault
Create vault/ at the repository root and move the generated content there:
mkdir ../vault
mv content/* ../vault/
rmdir content
On Windows, move the files with Explorer or Move-Item.
3. Point the site at the vault
Edit site/riebeckite.config.ts:
export default defineConfig({
content: { directory: "../vault" },
// ...
});
The path is relative to the configuration file, not the terminal's current directory.
4. Name the Worker and set the domain
Edit site/wrangler.jsonc:
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "my-project",
"compatibility_date": "2026-06-09",
"compatibility_flags": ["nodejs_compat"],
"assets": { "directory": "./dist" },
"routes": [{ "pattern": "my-project.example.com", "custom_domain": true }]
}
Keep compatibility_flags and assets when you edit the file; an assets-only Worker needs them.
Set site.baseUrl to https://my-project.example.com and adjust site.title.
5. Run locally
cd site
npm exec riebeckite check
npm exec riebeckite dev
6. Configure the workflow
The generated site/.github/workflows/publish.yml assumes the project root is the repository root. Move it to the repository root and add:
push.paths:site/**,vault/**, and the workflow file.defaults.run.working-directory: sitefor every run step.cache-dependency-path: site/package-lock.jsoninactions/setup-node.workingDirectory: siteoncloudflare/wrangler-action.- Cache paths prefixed with
site/where the workflow stores build state.
Keep package-lock.json in site/. See the sample workflow for the complete file:
https://github.com/Rerurate514/riebeckite-e2e-directories/blob/main/.github/workflows/publish.yml
7. Deploy
Add CLOUDFLARE_API_TOKEN as a repository secret and CLOUDFLARE_ACCOUNT_ID as a repository variable, then push main. The workflow builds from site/ and deploys the Worker.
Common mistakes
- Running
npmcommands from the repository root. Usesite/. - Using
vaultinstead of../vault. The path starts atsite/. - Leaving the workflow inside
site/.github/. GitHub only reads.github/workflows/at the repository root. - Forgetting
vault/**inpush.paths, so content updates do not trigger a deploy.
Next
Powered by Riebeckite