Alnair

Plume

A lightweight, fast, and elegant static blog generator.

English δΈ­ζ–‡

Features

Installation

npm install

Quick Start & Customization

🎨 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:

Usage

  1. Create markdown files in the posts/ directory
  2. Run the build command to generate HTML
npm run build

The generated HTML files will be in the public/ directory.

Post Format

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...

Front Matter Fields

Features

πŸ“ Math Formulas

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}
$$

🏷️ Tags System

Add tags in the front matter:

tags: [JavaScript, Tutorial, Web Development]

The system automatically generates:

πŸ“¦ Archive Functionality

To archive a post (hide from homepage but keep accessible):

archived: true

Archived posts will:

πŸ“‘ Auto-Generated TOC

The system automatically generates a table of contents for each post with:

πŸ—‘οΈ Automatic Cleanup

During build, automatically removes:

Project Structure

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

Style Philosophy

This blog follows a simple philosophy:

  1. Keep it simple - No unnecessary complexity
  2. Keep it fast - Minimal resources, fast loading
  3. Keep it accessible - Everyone should be able to read it
  4. Keep it readable - Good typography and spacing
  5. Keep it clean - Clean code and clean design

Development

# Build once
npm run build

# Watch mode (if implemented)
npm run watch

License

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

Markdown file format

---
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:

Build the blog

npm run build

This will generate HTML files in the public/ directory.

Watch for changes

npm run watch

This will watch for changes in your markdown files and rebuild automatically.

View your blog

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

Project Structure

blog/
β”œβ”€β”€ 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

Writing Posts

Front Matter

Each post should start with YAML front matter:

---
title: Your Post Title
date: 2025-10-26
---

Markdown Features

Style Philosophy

This blog follows a simple philosophy:

  1. Keep it simple - No unnecessary complexity
  2. Keep it fast - Minimal resources, fast loading
  3. Keep it accessible - Everyone should be able to read it
  4. Keep it readable - Good typography and spacing
  5. Keep it clean - Clean code and clean design

License

MIT - Do whatever you want with it!