Skip to content

Latest commit

 

History

History

README.md

Comark Documentation

This directory contains comprehensive documentation for the Comark library, built with the comark-docs Nuxt layer.

Documentation Structure

Getting Started

Agent skill

To install the Comark Agent Skill from the published documentation site:

npx skills add https://comark.dev

See the Installation guide (section Agent Skill) for more context.

Core API Documentation

  1. Parse API - String parsing

    • parseMarkdown() - Parse markdown strings
    • Types and interfaces
  2. Auto-Close API - Handle incomplete syntax

    • autoCloseMarkdown() - Auto-close unclosed syntax
    • Streaming integration
    • Use cases

Rendering

  1. Vue Rendering - Render Comark content in Vue

    • Component props
    • Custom components
    • Slots and error handling
  2. React Rendering - Render Comark content in React

    • Component props
    • Custom components
    • Props conversion
  3. Svelte Rendering - Render Comark content in Svelte

    • Snippets and streaming
    • SvelteKit SSR
  4. Angular Rendering - Render Comark content in Angular

    • Standalone components
    • Custom components and streaming
  5. HTML Rendering - Framework-free HTML strings

  6. ANSI Rendering - Terminal output

Quick Navigation

By Use Case

I want to...

By Technology

Development

Quick Start

# Install dependencies
pnpm install

# Start development server
pnpm run dev

Your documentation site will be running at http://localhost:3000

Project Structure

docs/
├── content/              # Documentation markdown files
│   ├── index.md              # Documentation home
│   ├── 1.getting-started/    # Getting started guides
│   ├── 2.syntax/             # Syntax documentation
│   ├── 3.rendering/          # Framework and string rendering
│   ├── 5.api/                # API reference docs
│   └── 8.examples.md         # Examples
├── public/              # Static assets
└── package.json         # Dependencies and scripts

API Reference

Parse Utilities

Function Purpose Documentation
parseMarkdown() Parse string Parse API
autoCloseMarkdown() Auto-close syntax Auto-Close API

Framework Components

Export Type Documentation
Markdown (Vue) Component Vue Rendering
Markdown (React) Component React Rendering
Markdown (Svelte) Component Svelte Rendering
Markdown (Angular) Component Angular Rendering

Types

Type Purpose Documentation
MarkdownDocument Parse Markdown document API Reference
Node AST node API Reference

Contributing to Documentation

When contributing documentation:

  1. Follow the existing structure - Match the format of existing docs
  2. Include code examples - Show TypeScript and framework-specific examples
  3. Add cross-references - Link to related documentation
  4. Test all examples - Ensure code examples actually work
  5. Use proper markdown - Follow Comark for components

Documentation Standards

  • Headers: Use sentence case (e.g., "Parse API" not "Parse api")
  • Code blocks: Always specify language (typescript, vue, etc.)
  • Links: Use relative links within docs
  • Examples: Include both simple and advanced examples
  • TypeScript: Always include type annotations
  • Comments: Explain non-obvious code

Built With

This documentation site uses:

Deployment

Build for production:

pnpm run build

The built files will be in the .output directory, ready for deployment.

Deploy to:

Questions or Issues?

License

Documentation is under the same license as the project (ISC).