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

FieldTypeDescription
titlestringPage title (required)
descriptionstringShort description (optional)
tagsstring[]Array of tags
categorystringCategory name
datedateCreation date
updateddatelast updated date
draftbooltrue for draft (private)
[[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

  1. Create a GitHub repository and push your code.
  2. Select GitHub Actions in Settings → Pages → Source.
  3. If using a subpath (/repo-name), set the following in Settings → Variables:
    • SITE_URL: https://username.github.io
    • BASE_PATH: /repo-name
  4. Push to the main branch 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