Markdown Viewer
đĻSelf-Hosting
âšī¸
Self-hosted browser markdown editor on Cloudflare Pages with share-link generation and Cursor MCP support
Purpose: Self-hosted markdown editor and preview utility for Pacing Agency, used for fast draft creation, export workflows, and shareable review links.
Where it runs: Cloudflare Pages (production + preview deployments), plus local static runtime for development.
Last verified: 2026-03-13
Accessâ
- Owner type: Internal (with optional client-facing usage via shared links)
- Account owner: Pacing Agency
- Technical owner: Pacing Engineering / Delivery
- Category: SELF_HOSTING
- Account type: INTERNAL, CLIENT_ACCESS
- Monthly cost: 0.00 GBP (free Cloudflare Pages tier at current usage)
- Primary URL: viewer.pacing.agency
- Preview URLs: Cloudflare Pages
*.pages.devbranch previews - Environment mapping:
- Production: Cloudflare Pages deploy from
main - Staging/Preview: Branch-based preview deploys in Pages
- Development: Local static runtime (no backend service required)
- Production: Cloudflare Pages deploy from
API Accessâ
The viewer itself is fully client-side and does not require a runtime backend API.
- Runtime auth: None for end users (public static app)
- Credential storage: N/A for app runtime; deploy credentials remain in Cloudflare dashboard and maintainer auth sessions
- Secret handling: No runtime secrets should be embedded in frontend code
- Rate limits: Cloudflare Pages platform limits apply to hosted delivery
Cursor MCP: Viewer Share Linksâ
The viewer has a dedicated MCP server for share-link workflows in Cursor:
- MCP server identifier:
project-0-pacingmd-viewer-share - Server name:
viewer-share - Tool 1:
generate_viewer_share_link- Generates
https://viewer.pacing.agencyURLs from markdown content or file paths - Supports
viewmode (editor,split,preview) - Supports
copyToClipboard,save, and saved-link metadata (name,summary) - Supports optional custom
origin,pathname, URL length warning threshold, and registry path
- Generates
- Tool 2:
list_viewer_share_links- Lists previously saved links from local JSONL registry
- Supports optional
limitand customregistryPath
Current useâ
- Drafting and reviewing markdown for internal docs and client handover assets
- Creating fast collaborative review links without requiring accounts
- Exporting markdown outputs into MD/HTML/PDF formats
- Sharing pre-set viewer states (content + view mode) through encoded URL hashes
- Supporting Cursor-based documentation workflows via MCP share-link generation
Share-link behaviourâ
- Markdown payloads are compressed and encoded into URL hash parameters
- View mode can be pre-set in links (
editor,split,preview) - Links are client-side decoded by the viewer at runtime
- Backward compatibility for older share links should be preserved when format changes
Dependenciesâ
Infrastructureâ
- Hosting: Cloudflare Pages (free static hosting tier, branch previews, custom domain support)
- Custom domain:
viewer.pacing.agency - Source model: Git-connected deploys from repo branch (
main) or optional manual deploy via Wrangler
Frontend librariesâ
marked(markdown parsing)DOMPurify(sanitisation)highlight.js(syntax highlighting)MathJax(math rendering)Mermaid(diagram rendering)pako(share payload compression)- Export helpers for file downloads and PDF generation
Failure impactâ
- Documentation draft/review throughput drops
- Share-link collaboration flow becomes unavailable
- Export workflows for quick handovers slow down
Integrations and automationsâ
Cursor integrationâ
- Cursor uses the viewer-share MCP server for generating and managing viewer links directly in AI workflows
- Share links are used for rapid review loops where content needs to be previewed in a browser-ready format
- This creates a practical bridge between Cursor authoring and browser-based markdown validation
Deployment workflowsâ
- Recommended: Git-connected Cloudflare Pages deploys on push/merge
- Alternative: Manual deploys with Wrangler for quick publish workflows
- Desktop variant: Optional Neutralino-based desktop build in
desktop-app/(offline workflow option)
Operationsâ
Change and deploy workflowâ
- Implement changes in feature branch.
- Validate locally (rendering, share links, export, mobile layout).
- Open PR and review.
- Merge to
main. - Confirm Cloudflare Pages production deployment is healthy.
Verification checklistâ
- Load viewer.pacing.agency and confirm editor + preview render
- Validate markdown import and export (MD/HTML/PDF)
- Generate and open share link; confirm content and view mode roundtrip
- Validate Mermaid and Math rendering on representative sample content
- Confirm mobile tab/menu interactions still work as expected
Rollbackâ
- Revert to previous known-good commit and redeploy via Cloudflare Pages
- Use Pages deployment history to restore prior successful version if required
Security and complianceâ
- App is client-side; no server-side processing of user-authored markdown content
- Avoid persisting sensitive client content in long-lived local storage unless required
- Never commit deploy credentials or API tokens
- Keep sanitisation and rendering library updates reviewed for security regressions
Resourcesâ
- Production app: viewer.pacing.agency
- Repository: Pacing-Agency/pacing-md
- Upstream base project: ThisIs-Developer/Markdown-Viewer
- Cloudflare Pages docs: Cloudflare Pages
- Cursor docs: Cursor MCP docs
- Internal architecture reference:
1_Internal/pacingmd/.cursor/rules/architecture/RULE.md - Internal documentation rule:
1_Internal/pacingmd/.cursor/rules/documentation/RULE.md - Internal template source:
1_Internal/pacingmd/TOOL_PAGE_TEMPLATE.md
TODOâ
- Confirm and document exact Cloudflare Pages project ID for
viewer.pacing.agency - Confirm access policy intent (fully public vs access-gated) and document final policy
- Add a saved-link registry location standard for team machines using
list_viewer_share_links - Add release smoke-test checklist into standard deploy process/PR template
- Document any required retention policy for locally saved share-link registries