Setup
# After cloning, install dependencies
npm install
# Start development server (http://localhost:4321)
npm run dev
# Build for production (also generates Pagefind search index)
npm run build
# Preview build results
npm run preview
Creating Pages
Just place Markdown files in src/content/wiki/ to create pages.
---
title: "Page Title"
description: "Short description (optional)"
tags: ["tag1", "tag2"]
category: "Category Name"
date: 2024-01-01
updated: 2024-06-01
---
Write your content here. You can use [[WikiLink]] to link to other pages.
Common Frontmatter Fields
| Field | Type | Description |
|---|---|---|
title | string | Page title (required) |
description | string | Short description (optional) |
tags | string[] | Array of tags |
category | string | Category name |
date | date | Creation date |
updated | date | last updated date |
draft | bool | true for draft (private) |
Using WikiLink
[[Page Name]] → Link to page
[[Page Name|Display Text]] → Link with custom text
[[Subfolder/Page Name]] → Link to page in subfolder
Backlinks (list of pages linking to the current page) are automatically displayed at the bottom of the page.
Directory Structure
Content is managed as resources under src/content/wiki/[lang]/.
You can further organize them with subdirectories.
src/content/wiki/
├── ja/ → Japanese (Root)
│ ├── index.mdx → /wiki/ja
│ ├──入门.mdx → /wiki/ja/getting-started
│ └── recipes/
│ └── pasta.mdx → /wiki/ja/recipes/pasta
└── en/ → English
└── index.mdx → /wiki/en
Files in src/content/wiki/templates/ are treated as templates and will not be published as normal pages.
Internationalization (i18n)
See Sample: Internationalization (i18n) for details. Automatic fallback feature ensures that the Japanese version is displayed if a translation is missing.
Customizing Sidebar
Edit src/data/sidebar-nav.ts to change the sidebar configuration.
// Manual links
{
title: 'Guide',
icon: 'fa-solid fa-book',
items: [
{ slug: 'getting-started', label: 'Getting Started' },
{ slug: 'shortcode-reference', label: 'Shortcodes' },
],
},
// Auto-collect category
{
title: 'Recipes',
icon: 'fa-solid fa-utensils',
category: 'Recipes',
autoSort: 'title',
},
Publishing to GitHub Pages
- Create a GitHub repository and push your code.
- Select
GitHub Actionsin Settings → Pages → Source. - If using a subpath (
/repo-name), set the following in Settings → Variables:SITE_URL:https://username.github.ioBASE_PATH:/repo-name
- Push to the
mainbranch to trigger auto-deployment.
BASE_PATH is not needed if you use a custom domain or username.github.io at the root.
Next: Sample: Shortcode Reference →