Tools for writing and previewing travel itineraries in Markdown. This repository is a monorepo managed with npm workspaces. It contains:
- remark plugins published to npm (e.g.
remark-itinerary,remark-itinerary-alert) - a reusable editor bundle (
@itinerary-md/editor) - a demo application (
apps/studio) showcasing authoring and preview – Demo site: tripmd.dev
For overall structure and high-level notes, see DeepWiki (AI-generated; may be incomplete or outdated): deepwiki.com/cumuloworks/itinerary-md.
packages/core—remark-itinerary: remark plugin that converts itinerary-style Markdown into custom MDAST nodes (itmdEvent,itmdHeading) and injects normalized metadata (e.g.,itmdDate,itmdPrice)packages/alert—remark-itinerary-alert: convert GitHub-style blockquote alerts (e.g.> [!NOTE]) intoitmdAlertnodespackages/editor—@itinerary-md/editor: prebuilt editor UI assets used by the demo app
apps/studio— Demo editor/preview app built with Astro and React
This repo uses npm workspaces to manage multiple packages and an app in a single codebase.
- Root
package.jsondefines shared scripts that invoke each workspace - Each workspace has its own
package.jsonand build/test config - Development often runs concurrently across workspaces via
npm run dev
Published packages:
remark-itinerary— parse itinerary-like Markdown into custom MDAST nodesremark-itinerary-alert— support GitHub-style blockquote alerts@itinerary-md/editor— prebuilt editor assets for integrations
Clone and install:
git clone <this-repo-url>
cd itinerary-md
npm installStart everything for local development (plugins + editor bundle + demo app):
npm run devThis runs the following concurrently:
packages/coredev buildpackages/editorpack/watchapps/studiodev server (Astro, default athttp://localhost:4321)
Build all packages and the demo app:
npm run buildRun tests across workspaces (if present):
npm testInstall from npm:
npm i remark-itinerary remark-itinerary-alertBasic usage:
import { unified } from 'unified';
import remarkParse from 'remark-parse';
import remarkItineraryAlert from 'remark-itinerary-alert';
import remarkItinerary from 'remark-itinerary';
const processor = unified()
.use(remarkParse)
// IMPORTANT: run alert BEFORE remark-itinerary
.use(remarkItineraryAlert)
.use(remarkItinerary);See per-package READMEs for details:
Common scripts at repo root:
# Run dev for core, editor, studio together
npm run dev
# Lint and format (Biome)
npm run lint
npm run lint:fix
npm run format
npm run format:check
# Build all packages first, then the demo app
npm run build
# Run tests (Vitest)
npm test
npm run test:watch
# Clean generated files except node_modules
npm run cleanWorkspace tips:
- Run a script in a specific workspace:
npm -w packages/core run build - Run a script across all workspaces (if present):
npm -ws run test --if-present - Add a dependency to a workspace:
npm -w packages/core i <pkg>
/
├── apps/
│ └── studio/ # Demo editor/preview app (Astro)
├── packages/
│ ├── core/ # remark-itinerary (plugin + helpers)
│ ├── alert/ # remark-itinerary-alert (blockquote alerts)
│ └── editor/ # @itinerary-md/editor (editor bundle)
├── README.md
└── package.json
remark-itinerary(packages/core): MIT (seepackages/core/LICENSE)remark-itinerary-alert(packages/alert): MIT (seepackages/alert/LICENSE)- Others: UNLICENSED