Wikidot markup parser and renderer.
| Package | Description |
|---|---|
| @wdprlib/ast | AST types for Wikidot markup |
| @wdprlib/parser | Parser for Wikidot markup |
| @wdprlib/render | HTML renderer for Wikidot markup |
| @wdprlib/decompiler | Decompiler for Wikidot markup |
| @wdprlib/runtime | Client-side runtime for Wikidot markup |
npm install @wdprlib/parser @wdprlib/renderWDPR Workers wiki starter is a D1-backed starter using Cloudflare Workers, the official Cloudflare Vite plugin, Hono, vanilla TypeScript, and R2-backed HTML blocks.
import { parse } from '@wdprlib/parser'
import { renderToHtml } from '@wdprlib/render'
const ast = parse('**Hello** world')
const html = renderToHtml(ast)Every package exports its own build information:
import { buildInfo } from '@wdprlib/render'
buildInfo.version // This package's version
buildInfo.sha // Full source commit SHA, or null when unavailable
buildInfo.dirty // Uncommitted repository changes, or null when unavailableThe object is read-only and frozen. It records a snapshot when metadata is generated,
not the current state of the consuming application. dirty includes tracked and
untracked changes across the repository, excluding ignored files. Dependency package
versions are not included. ESM, CommonJS and Bun exports carry the same snapshot.
bun install
bun run build
bun testbun install and build startup generate package metadata automatically. Run
bun run build:info after changing the checkout when using source imports without
rebuilding. Restart bun run dev to refresh metadata during watch development.
Generated metadata is included in published packages; consumers do not need Git.
wdpr began as an independent TypeScript implementation of Wikidot markup. Its syntax behavior, AST compatibility, and parser design were developed with reference to the following projects, and portions of the project were later adapted from them:
- ftml, licensed under the GNU Affero General Public License v3.0 or later.
- Wikidot Text_Wiki, licensed under the GNU Lesser General Public License v2.1.
See THIRD-PARTY-LICENSES.md for the applicable notices and licenses.
Available under the terms of the GNU Affero General Public License. See LICENSE.