This page is a sample that demonstrates the basic features of snsn-codex.
You can copy and paste each section to use as a base for your own pages.
Writing Pages (Frontmatter)
Just place .md or .mdx files in src/content/wiki/ to create pages.
Metdata is set in the frontmatter block at the beginning of the file, enclosed by ---.
---
title: "Page Title" # Required: Page title
description: "Short desc" # Optional: Used for search/meta tags
tags: ["tag1", "tag2"] # Optional: Tags (array)
category: "Category Name" # Optional: Key for sidebar auto-collection
aliases: ["Alias", "Old Title"] # Optional: Aliases for WikiLink resolution
date: 2026-01-01 # Optional: Creation date
updated: 2026-06-01 # Optional: Update date (affects "Recent Updates")
draft: false # Optional: Set to true to hide from build
hideBacklinks: true # Optional: Set to true to hide backlinks section
---
Frontmatter Fields
| Field | Type | Description |
|---|---|---|
title | string | Required. Page title |
description | string | Short description (for search/OGP) |
tags | string[] | Array of tags |
category | string | Category name (sidebar auto-collection) |
aliases | string[] | Aliases that can be resolved by WikiLink |
date | date | Creation date (YYYY-MM-DD) |
updated | date | Update date (YYYY-MM-DD) |
draft | bool | Hide from build if true |
hideBacklinks | bool | Hide backlinks section if true |
template | bool | Exclude from lists/sidebar/graph/search if true (URL still exists) |
Connecting Pages with WikiLink
Write [[Page Name]] to create a link.
- Normal Link → Getting Started
- Custom Text → Read the setup guide
- Non-existent Page → Page Not Written Yet (Displayed as a red link)
The Backlinks section at the bottom of the page automatically lists pages linking to this page.
Callouts (Boxes)
Badges
Show statuses or classifications inline:
Completed In Progress Not Started Important Archived ExperimentalInfobox
Summarize page overviews in a right-aligned box. Pass an array of labels and values to the fields property.
Details (Collapsible)
Click to expand
This is collapsed content. Used to hide supplementary information or long descriptions.
- You can write Markdown inside
- Bold,
code, and lists are OK
Footnotes
Important supplements can be added as footnotes at the end [1] .
Multiple footnotes [2] can be combined.
Hover over the number to see a popup, and click to scroll to the bottom.
Tables
| Feature | Description | Difficulty |
|---|---|---|
| WikiLink | Link between pages using [[Page Name]] | ★☆☆ |
| Callouts | Note / tip / warning / danger boxes | ★☆☆ |
| Badges | Inline color labels | ★☆☆ |
| Infobox | Right-aligned info summary box | ★☆☆ |
| Tabs | Switch content with Tabs / Tab components | ★★☆ |
| Transclusion | Embed other pages with Include | ★★☆ |
| Datatable | JSON-linked table with Datatable | ★★★ |
Code
Inline code: const wiki = new Wiki()
Code block:
// Just place it in src/content/wiki/my-page.mdx to create a page
const page = await getEntry('wiki', 'my-page');
console.log(page.data.title); // "My Page"
Math
Inline math:
Block math:
Mermaid Diagrams
graph TD
A[Start] --> B{Condition}
B -->|Yes| C[Action 1]
B -->|No| D[Action 2]
C --> E[End]
D --> E
sequenceDiagram
Editor->>+codex: File save
codex->>+Astro: Build trigger
Astro-->>-codex: Static HTML generation
codex-->>-Editor: Preview update
Related Pages
- Getting Started — Setup and basic usage
- Sample: Shortcode Reference — List of all shortcodes
- Sample: Advanced Features — Tabs, embedding, and Navbox