A lightweight, fast, and elegant static blog generator.
| English | δΈζ |
npm install
π¨ Want to customize your blog? Check out CONFIG.md for detailed configuration options.
π Want to deploy to GitHub Pages? Check out DEPLOY.md for step-by-step instructions.
You can easily customize:
posts/ directorynpm run build
The generated HTML files will be in the public/ directory.
Each post should have YAML front matter at the top:
---
title: Your Post Title
date: 2025-10-27
modified: 2025-10-27 # Optional: last modified date
tags: [Tag1, Tag2] # Optional: post tags
math: true # Optional: enable math formulas
archived: true # Optional: archive post (hide from homepage)
---
## This is a heading
Your content starts here...
title (required): The post titledate (required): Publication date in YYYY-MM-DD formatmodified (optional): Last modified datetags (optional): Array of tags for the postmath (optional): Set to true to enable MathJax math renderingarchived (optional): Set to true to archive the post (wonβt show on homepage but still accessible)Enable math formulas by setting math: true in the front matter:
Inline math: $E = mc^2$
Display math:
$$
\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}
$$
Add tags in the front matter:
tags: [JavaScript, Tutorial, Web Development]
The system automatically generates:
To archive a post (hide from homepage but keep accessible):
archived: true
Archived posts will:
The system automatically generates a table of contents for each post with:
During build, automatically removes:
blog/
βββ posts/ # Markdown posts
β βββ welcome.md
β βββ ...
βββ public/ # Generated HTML (auto-generated)
β βββ index.html
β βββ tags.html
β βββ archive.html
β βββ ...
βββ template.html # HTML template
βββ build.js # Build script
βββ package.json # Project configuration
βββ README.md # Documentation
This blog follows a simple philosophy:
# Build once
npm run build
# Watch mode (if implemented)
npm run watch
MIT - Do whatever you want with it!
## Usage
### Create your first post
Create a markdown file in the `posts/` directory:
```bash
# The build script will create a sample post if posts directory is empty
npm run build
---
title: Your Post Title
date: 2025-10-26
modified: 2025-10-27 # Optional: Last modified date (only shown if different from date)
tags: [Tech, Blog, Tutorial] # Optional: Article tags
math: true # Optional: Enable MathJax for mathematical formulas
---
## Your content here
Write whatever the hell you want!
YAML Front Matter Fields:
title (required): Post titledate (required): Publication date (YYYY-MM-DD)modified (optional): Last modified date - only displayed if different from publication datetags (optional): Array of tags for categorizing posts (e.g., [Tech, Blog])math (optional): Set to true to enable MathJax for mathematical formulasnpm run build
This will generate HTML files in the public/ directory.
npm run watch
This will watch for changes in your markdown files and rebuild automatically.
Open public/index.html in your browser to see your blog.
Or use a local server:
# In the public directory
python3 -m http.server 3000
# Then visit http://localhost:3000
index.html) - List of all poststags.html) - Browse posts by tagstag-xxx.html) - Posts for specific tags*.html) - Your blog postsblog/
βββ build.js # Build script
βββ watch.js # Watch script for development
βββ template.html # HTML template
βββ package.json # Dependencies
βββ posts/ # Your markdown posts
β βββ *.md
βββ public/ # Generated HTML files
βββ index.html
βββ *.html
Each post should start with YAML front matter:
---
title: Your Post Title
date: 2025-10-26
---
# H1, ## H2, etc.*italic*, **bold**[text](url)`inline` or ` ```language ` for blocks$inline$ or $$block$$ (KaTeX)> quote- item or 1. itemThis blog follows a simple philosophy:
MIT - Do whatever you want with it!