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

FieldTypeDescription
titlestringRequired. Page title
descriptionstringShort description (for search/OGP)
tagsstring[]Array of tags
categorystringCategory name (sidebar auto-collection)
aliasesstring[]Aliases that can be resolved by WikiLink
datedateCreation date (YYYY-MM-DD)
updateddateUpdate date (YYYY-MM-DD)
draftboolHide from build if true
hideBacklinksboolHide backlinks section if true
templateboolExclude from lists/sidebar/graph/search if true (URL still exists)

Write [[Page Name]] to create a link.

The Backlinks section at the bottom of the page automatically lists pages linking to this page.


Callouts (Boxes)

Note box. Used for supplementary information or notes.
Tip box. Used for recommended procedures or best practices.
Warning box. Used for points of caution that are easy to overlook.
Danger box. Used before data loss or irreversible operations.

Badges

Show statuses or classifications inline:

Completed In Progress Not Started Important Archived Experimental

Infobox

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

FeatureDescriptionDifficulty
WikiLinkLink between pages using [[Page Name]]★☆☆
CalloutsNote / tip / warning / danger boxes★☆☆
BadgesInline color labels★☆☆
InfoboxRight-aligned info summary box★☆☆
TabsSwitch content with Tabs / Tab components★★☆
TransclusionEmbed other pages with Include★★☆
DatatableJSON-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: E=mc2E = mc^2

Block math:

ex2dx=π\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}

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


Footnotes (Content)

[1] Write footnote text here. It will appear as a popup when hovering over the number in the main text.
[2] You can list multiple footnotes. Use ”↩” to return to the reference point.