{"id":27232856,"url":"https://github.com/stacksjs/bunpress","last_synced_at":"2026-04-02T11:35:51.628Z","repository":{"id":286742699,"uuid":"962395475","full_name":"stacksjs/bunpress","owner":"stacksjs","description":"📝 Documentation, faster.","archived":false,"fork":false,"pushed_at":"2026-03-31T10:20:37.000Z","size":23819,"stargazers_count":11,"open_issues_count":5,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-03-31T10:23:47.554Z","etag":null,"topics":["bun","documentation","documentation-generator","markdown","tool"],"latest_commit_sha":null,"homepage":"https://bunpress.org","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stacksjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["stacksjs","chrisbbreuer"],"open_collective":"stacksjs"}},"created_at":"2025-04-08T05:13:11.000Z","updated_at":"2026-03-30T13:41:28.000Z","dependencies_parsed_at":"2025-04-25T22:18:24.712Z","dependency_job_id":"db4ec0b7-aa3e-4e61-bc0d-58856b9df87e","html_url":"https://github.com/stacksjs/bunpress","commit_stats":null,"previous_names":["stacksjs/bunpress"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/stacksjs/bunpress","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stacksjs%2Fbunpress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stacksjs%2Fbunpress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stacksjs%2Fbunpress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stacksjs%2Fbunpress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stacksjs","download_url":"https://codeload.github.com/stacksjs/bunpress/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stacksjs%2Fbunpress/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31305662,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T09:48:21.550Z","status":"ssl_error","status_checked_at":"2026-04-02T09:48:19.196Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bun","documentation","documentation-generator","markdown","tool"],"created_at":"2025-04-10T14:10:13.613Z","updated_at":"2026-04-02T11:35:51.598Z","avatar_url":"https://github.com/stacksjs.png","language":"TypeScript","funding_links":["https://github.com/sponsors/stacksjs","https://github.com/sponsors/chrisbbreuer","https://opencollective.com/stacksjs"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\".github/art/cover.jpg\" alt=\"Social Card of this repo\"\u003e\u003c/p\u003e\n\n[![npm version][npm-version-src]][npm-version-href]\n[![GitHub Actions][github-actions-src]][github-actions-href]\n[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)\n\u003c!-- [![npm downloads][npm-downloads-src]][npm-downloads-href] --\u003e\n\u003c!-- [![Codecov][codecov-src]][codecov-href] --\u003e\n\n# BunPress\n\n**Fast, modern documentation engine powered by Bun, inspired by VitePress**\n\nBunPress is a lightning-fast static site generator designed specifically for documentation. Built on top of Bun's blazing performance with a developer-friendly API inspired by VitePress.\n\n## Features\n\n### Core Features\n\n- ⚡ **Lightning Fast** - 0.18s build time (4,000 files), 11x faster than Eleventy\n- 📝 **Rich Markdown** - VitePress-compatible markdown with containers, alerts, code groups, and syntax highlighting\n- 📋 **Smart TOC** - Automatic table of contents with filtering, positioning (sidebar/inline/floating), and interactive navigation\n- 🛠️ **Developer Friendly** - Native TypeScript support, comprehensive CLI (15+ commands), and extensive customization\n\n### SEO \u0026 Analytics\n\n- 🔍 **Complete SEO** - Auto-generated sitemap.xml, robots.txt, Open Graph tags, and JSON-LD structured data\n- 📊 **Fathom Analytics** - Privacy-focused analytics with GDPR/CCPA compliance and DNT support\n- 🔎 **SEO Validation** - Built-in SEO checker with auto-fix mode for common issues\n\n### Markdown Extensions (VitePress-Compatible)\n\n- ✅ Custom containers (info, tip, warning, danger, details, raw)\n- ✅ GitHub-flavored alerts (note, tip, important, warning, caution)\n- ✅ Code features (line highlighting, line numbers, focus, diffs, errors/warnings, groups)\n- ✅ Code imports from files with line ranges and regions\n- ✅ Tables with alignment and formatting\n- ✅ Image enhancements with captions and lazy loading\n- ✅ Custom header anchors and inline TOC\n- ✅ **STX template syntax** in markdown — dynamic content with `@if`, `@foreach`, `{{ }}`, `\u003cscript server\u003e`\n\n### Developer Experience\n\n- 🚀 **Fast Dev Server** - ~100ms startup, hot reload, and instant feedback\n- 📦 **Small Bundles** - ~45KB per page (HTML + JS + CSS)\n- 💚 **Low Memory** - ~50MB dev server, ~250MB peak for 1000 files\n- 🎯 **15+ CLI Commands** - Build, dev, preview, stats, doctor, SEO check, and more\n\n## Quick Start\n\nGet started with BunPress in seconds:\n\n```bash\n# Install BunPress\nbun add @stacksjs/bunpress\n\n# Create a new documentation site\nmkdir my-docs\ncd my-docs\n\n# Initialize with basic structure\nbunx @stacksjs/bunpress init\n\n# Start development server\nbun run dev\n\n# Build for production\nbun run build\n```\n\n## Basic Usage\n\nCreate your first documentation page:\n\n```markdown\n---\ntitle: Welcome\nlayout: home\n---\n\n# Welcome to My Project\n\nThis is my awesome project documentation built with BunPress!\n\n## Quick Links\n\n- [Getting Started](/guide/getting-started)\n- [API Reference](/api)\n- [Examples](/examples)\n```\n\nConfigure your site in `bunpress.config.ts`:\n\n```typescript\nexport default {\n  title: 'My Documentation',\n  description: 'Built with BunPress',\n  nav: [\n    { text: 'Home', link: '/' },\n    { text: 'Guide', link: '/guide' },\n    { text: 'API', link: '/api' }\n  ],\n\n  // SEO Configuration\n  sitemap: {\n    enabled: true,\n    baseUrl: 'https://mysite.com',\n  },\n  robots: {\n    enabled: true,\n  },\n\n  // Analytics\n  fathom: {\n    enabled: true,\n    siteId: 'YOUR_SITE_ID',\n    honorDNT: true,\n  },\n}\n```\n\n## STX Templates in Markdown\n\nBunPress supports [STX](https://stx.sh) template syntax directly inside markdown files. This enables dynamic content generation — conditionals, loops, computed values, and more — powered by the STX templating engine.\n\n### Server Scripts\n\nDefine variables and logic in `\u003cscript server\u003e` blocks:\n\n```markdown\n\u003cscript server\u003e\nconst features = [\n  { name: 'Fast', desc: 'Built with Zig for maximum performance' },\n  { name: 'Modern', desc: 'ES modules and TypeScript native' },\n  { name: 'Simple', desc: 'Zero config, one binary' },\n]\nconst showBeta = false\n\u003c/script\u003e\n\n# Features\n\n@foreach (features as feature)\n### {{ feature.name }}\n\n{{ feature.desc }}\n\n@endforeach\n\n@if (showBeta)\n## Beta Features\n\nThese features are coming soon.\n@endif\n```\n\n### Available Directives\n\n| Directive | Description |\n|-----------|------------|\n| `\u003cscript server\u003e` | Define variables and run server-side logic |\n| `{{ expression }}` | Output an escaped expression |\n| `{!! expression !!}` | Output raw (unescaped) HTML |\n| `@if (condition)` / `@else` / `@endif` | Conditional rendering |\n| `@foreach (array as item)` / `@endforeach` | Iterate over arrays |\n| `@foreach (array as item, index)` | Iterate with index |\n| `@for (let i = 0; i \u003c n; i++)` / `@endfor` | C-style for loops |\n| `@include('Component')` | Include STX components |\n\n### Frontmatter Access\n\nFrontmatter values are automatically available in STX expressions:\n\n```markdown\n---\ntitle: My Page\nauthor: Chris\n---\n\n# {{ title }}\n\nWritten by {{ author }}.\n```\n\n### Inline Expressions\n\nUse expressions anywhere in your markdown:\n\n```markdown\n\u003cscript server\u003e\nconst count = 42\nconst items = ['Alpha', 'Beta', 'Gamma']\n\u003c/script\u003e\n\nThere are {{ count }} items and {{ items.length }} categories.\nThe sum is {{ 10 + 20 + 12 }}.\n```\n\nSTX processing happens before markdown conversion, so the output of STX directives is treated as regular markdown and rendered accordingly — headings, lists, bold, code blocks, and all other markdown features work as expected.\n\n## CLI Commands\n\nBunPress provides a comprehensive CLI for managing your documentation:\n\n```bash\n# Development\nbunpress dev              # Start dev server with hot reload\nbunpress build            # Build for production\nbunpress preview          # Preview production build\n\n# Content Management\nbunpress new \u003cpath\u003e       # Create new markdown file\nbunpress init             # Initialize new project\n\n# Maintenance\nbunpress clean            # Remove build artifacts\nbunpress stats            # Show documentation statistics\nbunpress doctor           # Run diagnostic checks\n\n# SEO\nbunpress seo:check        # Check SEO for all pages\nbunpress seo:check --fix  # Auto-fix SEO issues\n\n# Configuration\nbunpress config:show      # Show current configuration\nbunpress config:validate  # Validate configuration\n```\n\n## Performance Benchmarks\n\nBunPress is **the fastest** documentation generator available, powered by Bun's built-in Zig-based markdown parser.\n\n### Markdown Engine Benchmarks\n\nReal benchmark results comparing BunPress against documentation frameworks and popular markdown engines. All engines configured with equivalent GFM features (tables, strikethrough, task lists, autolinks). Tested on Apple M3 Pro, 18GB RAM, Bun 1.3.10.\n\n\u003e **Fairness note:** These results are conservative. Real VitePress adds Shiki syntax highlighting + Vue plugins on top of markdown-it. Real Astro adds Shiki on top of remark/rehype. commonmark.js does not support GFM, so it processes fewer features and appears artificially fast.\n\n#### Simple Markdown (paragraph + inline formatting)\n\n| Engine | Avg Time | vs BunPress |\n|--------|---------|-------------|\n| **BunPress** | **2.09 µs** | - |\n| commonmark (no GFM) | 3.91 µs | 1.9x slower |\n| Eleventy | 4.93 µs | 2.4x slower |\n| VitePress | 7.87 µs | 3.8x slower |\n| marked | 29.67 µs | 14x slower |\n| showdown | 32.48 µs | 16x slower |\n| micromark | 120.10 µs | 57x slower |\n| Astro | 126.36 µs | 60x slower |\n\n#### Real-World Doc Page (~3KB markdown)\n\n| Engine | Avg Time | vs BunPress |\n|--------|---------|-------------|\n| **BunPress** | **28.60 µs** | - |\n| commonmark (no GFM) | 101.47 µs | 3.5x slower |\n| Eleventy | 124.67 µs | 4.4x slower |\n| VitePress | 178.68 µs | 6.2x slower |\n| showdown | 791.29 µs | 28x slower |\n| marked | 841.17 µs | 29x slower |\n| micromark | 2.03 ms | 71x slower |\n| Astro | 2.56 ms | 90x slower |\n\n#### Large Document Stress Test (~33KB markdown)\n\n| Engine | Avg Time | vs BunPress |\n|--------|---------|-------------|\n| **BunPress** | **204.97 µs** | - |\n| commonmark (no GFM) | 1.01 ms | 4.9x slower |\n| Eleventy | 1.07 ms | 5.2x slower |\n| VitePress | 1.40 ms | 6.8x slower |\n| showdown | 12.76 ms | 62x slower |\n| micromark | 21.61 ms | 105x slower |\n| Astro | 26.56 ms | 130x slower |\n| marked | 47.41 ms | 231x slower |\n\n#### Throughput: 100 Mixed Documents\n\n| Engine | Avg Time | vs BunPress |\n|--------|---------|-------------|\n| **BunPress** | **827.40 µs** | - |\n| commonmark (no GFM) | 3.45 ms | 4.2x slower |\n| Eleventy | 3.80 ms | 4.6x slower |\n| VitePress | 4.85 ms | 5.9x slower |\n| marked | 17.43 ms | 21x slower |\n| showdown | 25.29 ms | 31x slower |\n| micromark | 72.79 ms | 88x slower |\n| Astro | 84.95 ms | 103x slower |\n\n### Build Performance (4,000 markdown files)\n\nUsing the same methodology as [11ty's official performance tests](https://www.11ty.dev/docs/performance/):\n\n| Generator | Build Time | vs BunPress |\n|-----------|-----------|-------------|\n| **BunPress** | **0.18s** | - |\n| Eleventy | 1.93s | 11x slower |\n| VitePress | 8.50s | 47x slower |\n| Astro | 22.90s | 130x slower |\n| Gatsby | 29.05s | 165x slower |\n| Next.js | 70.65s | 401x slower |\n\n### Full-Featured Build (with syntax highlighting)\n\n| Generator | Build Time | vs BunPress |\n|-----------|-----------|-------------|\n| **BunPress** | **4.12s** | - |\n| VitePress | 8.50s | 2x slower |\n| Astro | 22.90s | 5.6x slower |\n| Gatsby | 29.05s | 7x slower |\n| Next.js | 70.65s | 17x slower |\n\nRun the benchmarks yourself:\n\n```bash\ncd benchmark \u0026\u0026 bun install \u0026\u0026 bun run bench\n```\n\n## Testing\n\n```bash\nbun test              # Run all tests\nbun test:quick        # Quick test run (10s timeout)\nbun run typecheck     # Type checking\nbun run lint          # Lint code\n```\n\n## Changelog\n\nPlease see our [releases](https://github.com/stacksjs/bunpress/releases) page for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.\n\n## Community\n\nFor help, discussion about best practices, or any other conversation that would benefit from being searchable:\n\n[Discussions on GitHub](https://github.com/stacksjs/bunpress/discussions)\n\nFor casual chit-chat with others using this package:\n\n[Join the Stacks Discord Server](https://discord.gg/stacksjs)\n\n## Postcardware\n\n“Software that is free, but hopes for a postcard.” We love receiving postcards from around the world showing where Stacks is being used! We showcase them on our website too.\n\nOur address: Stacks.js, 12665 Village Ln #2306, Playa Vista, CA 90094, United States 🌎\n\n## Sponsors\n\nWe would like to extend our thanks to the following sponsors for funding Stacks development. If you are interested in becoming a sponsor, please reach out to us.\n\n- [JetBrains](https://www.jetbrains.com/)\n- [The Solana Foundation](https://solana.com/)\n\n## License\n\nThe MIT License (MIT). Please see [LICENSE](LICENSE.md) for more information.\n\nMade with 💙\n\n\u003c!-- Badges --\u003e\n[npm-version-src]: https://img.shields.io/npm/v/@stacksjs/bunpress?style=flat-square\n[npm-version-href]: https://npmjs.com/package/@stacksjs/bunpress\n[github-actions-src]: https://img.shields.io/github/actions/workflow/status/stacksjs/bunpress/ci.yml?style=flat-square\u0026branch=main\n[github-actions-href]: https://github.com/stacksjs/bunpress/actions?query=workflow%3Aci\n\n\u003c!-- [codecov-src]: https://img.shields.io/codecov/c/gh/stacksjs/bunpress/main?style=flat-square\n[codecov-href]: https://codecov.io/gh/stacksjs/bunpress --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstacksjs%2Fbunpress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstacksjs%2Fbunpress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstacksjs%2Fbunpress/lists"}