Skip to content
 
 

Latest commit

 

History

54 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wool

Extensible grip clone with live preview, syntax highlighting, math rendering, and diagram support.

Features

  • Live Preview: GitHub-flavored markdown with auto-reload on file changes
  • Linked Document Navigation: Click relative markdown links to navigate between documents with live reload
  • Syntax Highlighting: Prism.js support for code blocks (enabled by default)
  • Math Rendering: KaTeX support for LaTeX equations (enabled by default)
  • D2 Diagrams: Inline SVG rendering from D2 code blocks (enabled by default, requires d2)
  • Mermaid Diagrams: Automatic rendering of Mermaid code blocks (always enabled)
  • Multiple Instances: Automatic port detection (ports 10009-10018) allows running multiple previews
  • Browser Integration: Automatically opens browser on startup
  • Static Files: Images and assets served relative to markdown file location

Installation

cargo install wool

Usage

USAGE:
    wool [FLAGS] <infile> [outfile]

FLAGS:
    -e, --export              Export html
    -h, --help                Prints help information
    -b, --no-browser          Don't open browser (browser opens by default)
        --no-d2               Disable D2 diagram rendering (enabled by default)
        --no-highlight        Disable syntax highlighting (enabled by default)
        --no-katex            Disable KaTeX math rendering (enabled by default)
    -n, --no-preview-frame    Don't render the preview frame
    -V, --version             Prints version information

ARGS:
    <infile>     Sets the input file to use
    <outfile>    Sets the output file to use

Examples

Basic preview

Opens browser automatically with all features enabled (syntax highlighting, KaTeX, D2, Mermaid):

wool readme.md

Navigate between linked markdown files

When previewing markdown, click on any relative link to a .md or .markdown file to navigate to that document. The preview will update and live reload will track the new file. Perfect for documentation with multiple interconnected files.

<!-- In readme.md -->
See the [API documentation](docs/api.md) for details.

<!-- Clicking the link navigates to docs/api.md in the preview -->

Preview without browser

wool readme.md --no-browser

Export to HTML

wool readme.md --export mypreview.html

Disable specific features

# Disable KaTeX math rendering
wool readme.md --no-katex

# Disable syntax highlighting
wool readme.md --no-highlight

# Disable D2 diagrams
wool readme.md --no-d2

# Disable multiple features
wool readme.md --no-katex --no-d2

Diagram Support

D2 Diagrams

Create diagrams using D2 syntax in code blocks:

```d2
x -> y: hello world
```

Mermaid Diagrams

Create diagrams using Mermaid syntax in code blocks:

```mermaid
graph TD
    A[Start] --> B[End]
```

About

Preview Github Markdown Offline

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages