A general-purpose static site generator powered by Marko.js v6
MarkoPress is a fast, modern static site generator that combines the power of Marko.js v6 with the simplicity of markdown. It's designed to be a drop-in alternative to VitePress and Docusaurus with full content compatibility.
- โก Blazing Fast - Built on Marko.js v6 with instant HMR and optimal performance
- ๐ Markdown Support - Full GitHub Flavored Markdown with frontmatter
- ๐จ Beautiful Themes - Default theme with dark mode, fully customizable
- ๐ Plugin System - Extend functionality with plugins
- ๐ฆ File-based Routing - Automatic route generation from content
- ๐ SEO Optimized - Automatic sitemap, robots.txt, and Open Graph tags
- ๐ Analytics Ready - Built-in support for GA4, Plausible, Umami
- ๐ Content Compatible - Works with existing VitePress/Docusaurus content
- ๐ฏ TypeScript - Full TypeScript support with type definitions
npm create markopress@latest my-site
cd my-site
npm installnpm run devVisit http://localhost:4173 to see your site!
npm run buildOutput will be in the dist/ directory.
npm run previewmy-markopress-site/
โโโ .markopress/
โ โโโ config.ts # Site configuration
โโโ content/ # All content (VitePress-style routing)
โ โโโ index.md # โ /
โ โโโ about.md # โ /about
โ โโโ docs/ # โ /docs/*
โ โ โโโ index.md
โ โ โโโ guide.md
โ โโโ blog/ # โ /blog/*
โ โโโ first-post.md
โโโ public/ # Static assets
โโโ src/
โ โโโ routes/ # Custom routes (optional)
โ โโโ tags/ # Custom Marko components
โโโ markopress.config.ts # Alternative config location
MarkoPress uses VitePress-style routing where file path directly determines URL.
The contentDir (default: content) contains all content. Directory structure = URL structure:
| File Path | URL |
|---|---|
content/index.md |
/ |
content/about.md |
/about |
content/docs/index.md |
/docs/ |
content/docs/guide.md |
/docs/guide |
content/blog/index.md |
/blog/ |
content/blog/first-post.md |
/blog/first-post |
import { defineConfig } from 'markopress';
export default defineConfig({
contentDir: 'content', // Default
content: {
docs: {
sidebar: true, // Auto-generate sidebar
toc: true, // Table of contents
},
blog: {
rss: true, // Generate RSS feed
list: true, // Generate blog list page
},
},
});| Flag | Description |
|---|---|
sidebar |
Auto-generate sidebar navigation for the section |
toc |
Generate table of contents for each page |
rss |
Generate RSS feed for the section |
list |
Generate a list/index page showing all items |
title(string) - Page titledescription(string) - SEO descriptiondraft(boolean) - Exclude from build when trueorder(number) - Sidebar orderingdate(Date) - Publication date (for blog)author(string) - Author name (for blog)tags(string[]) - Tags (for blog)
Use Marko components directly in your Markdown files for reusable, dynamic content blocks.
<alert-box kind="warning">
This is a **warning** alert with `code` support!
</alert-box>Add to your markopress.config.ts:
export default defineConfig({
markdown: {
markoTags: {
enabled: true,
tagsDir: 'tags/', // Directory for your components
},
},
});Create tags/alert-box.marko:
<div class=["alert", input.kind && "alert-" + input.kind]>
<${input.content}/>
</div>
<style>
.alert { padding: 1rem; border-radius: 8px; }
.alert-warning { background: #fff3cd; border: 1px solid #ffc107; }
</style><alert-box kind="warning">
This is a **warning** alert!
</alert-box>Available Documentation:
- Marko Tags Guide - Overview and quick start
- Component API - Component library reference
- Marko.js v6 Syntax - Syntax and best practices
- Component Support - Feature coverage analysis
- Lessons Learned - Common mistakes to avoid
Create markopress.config.ts:
import { defineConfig } from 'markopress';
export default defineConfig({
site: {
title: 'My Site',
description: 'My awesome site',
base: '/',
},
contentDir: 'content',
content: {
docs: {
sidebar: true,
toc: true,
},
blog: {
rss: true,
list: true,
},
},
theme: '@markopress/theme-default',
themeConfig: {
name: 'My Site',
navbar: [
{ text: 'Home', link: '/' },
{ text: 'Docs', link: '/docs' },
{ text: 'Blog', link: '/blog' },
],
sidebar: {
'/docs/': [
{
text: 'Getting Started',
items: [
{ text: 'Introduction', link: '/docs/intro' },
{ text: 'Installation', link: '/docs/install' },
],
},
],
},
},
markdown: {
lineNumbers: true,
theme: { light: 'github-light', dark: 'github-dark' },
},
});MarkoPress uses a powerful theming system with slot-based overrides.
// markopress.config.ts
export default defineConfig({
theme: '@markopress/theme-default',
});- Override Styles: Create
.markopress/theme/styles.css
:root {
--accent-color: #42b883;
--border-radius: 8px;
}-
Override Components: Copy to
.markopress/theme/components/ -
Override Layouts: Copy to
.markopress/theme/layouts/
See Theme Documentation for details.
Extend MarkoPress with plugins:
export default defineConfig({
plugins: [
'@markopress/plugin-content-docs',
'@markopress/plugin-content-blog',
'@markopress/plugin-content-pages',
// Custom plugins
'./plugins/my-plugin.ts',
],
});// plugins/my-plugin.ts
import { Plugin } from 'markopress';
export const myPlugin: Plugin = {
name: 'my-plugin',
hooks: {
contentLoaded(content) {
// Transform content
},
extendMarkdown(md) {
// Add markdown-it plugins
},
},
};npm run build
vercel --prodnpm run build
netlify deploy --prod --dir=distnpm run build
# Push dist/ to gh-pages branchFROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
EXPOSE 4173
CMD ["npm", "run", "preview"]- Getting Started
- Configuration Guide
- Marko Tags Guide - Use Marko components in Markdown
- Theming
- Plugin Development
- VitePress & Docusaurus Architecture Analysis - Comprehensive analysis of how VitePress and Docusaurus work, and how MarkoPress implements similar features with Marko.js v6
- Core architecture comparison
- Build system implementation
- Route generation strategies
- Plugin and theme systems
- Feature parity roadmap
- Component API Reference - Marko Tags component library
- Marko.js v6 Syntax - Syntax and best practices
- Component Support Coverage - Feature analysis
- Development Lessons - Common mistakes to avoid
| Feature | MarkoPress | VitePress | Docusaurus |
|---|---|---|---|
| Framework | Marko.js v6 | Vue 3 | React |
| Build Time | โก Fast | โก Fast | ๐ Slower |
| HMR | โ Instant | โ Fast | |
| TypeScript | โ Native | โ Supported | โ Supported |
| Content Compatible | โ Both | โ N/A | โ N/A |
| Themes | โ Slot-based | โ Vue Components | โ React Components |
| Plugins | โ Hooks API | โ Markdown API | โ React Plugins |
| Bundle Size | ๐ฆ Minimal | ๐ฆ Larger | ๐ฆ Largest |
| Learning Curve | ๐ Moderate | ๐ Easy | ๐ Steeper |
Contributions are welcome! Please read our Contributing Guide.
MIT ยฉ MarkoPress
Built with:
- Marko.js - UI framework
- @marko/run - Build tool
- markdown-it - Markdown parser
- Shiki - Syntax highlighting
- ๐ฌ Discord
- ๐ Issues
- ๐ Documentation
- ๐ฆ Twitter
Made with โค๏ธ by the MarkoPress team