Light/dark mode, follows the system and supports manual switching, with the preference saved in localStorage
margin — Astro Blog Template
By Liteink
Margin is a dark editorial-style blog theme built on Astro, aimed at magazines, journals, and independent publishing, with built-in full-text search, table of contents, author pages, and category archives.
Explore the design
Compare the page layouts and mobile experience. Open any screenshot for a closer look.
Actual screenshot captured by the server browser.
All pages & views 3
Screenshots show visual appearance; interactive behavior may differ.
What stands out
A quick read of the recorded project description.
Zero-server full-text search based on Pagefind, with the search script loaded only on the search page
Article pages automatically generate a table of contents with scroll tracking
Uses Astro content collections to manage Markdown/MDX, with categories, author pages, and RSS generated automatically from frontmatter
Built-in social sharing, RSS, sitemap, code highlighting, and SEO output such as Open Graph, Twitter Cards, and JSON-LD
Site configuration is centralized in src/config.json, allowing adjustment of navigation, author toggle, social and share links
Template Details
Margin is an Astro blog theme characterized by high-contrast editorial typography, positioned for magazine, journal, and independent publishing content sites. It uses Astro content collections to manage Markdown/MDX articles, and categories, author pages, and RSS are generated automatically from frontmatter. The theme offers light and dark modes, switchable via a manual toggle and remembered through localStorage.
Functionally, Margin integrates Pagefind for zero-server full-text search, and article pages automatically generate a table of contents with scroll tracking; it also includes social share buttons, RSS, sitemap, code highlighting, and SEO-related output such as Open Graph, Twitter Cards, and JSON-LD. By default no JavaScript is loaded; the Pagefind script is only included on the search page.
Site configuration is centralized in src/config.json, where you can set the site title, description, navigation, author toggle, social links, share links, and footer. Articles are written under src/content/posts/ and support Markdown and MDX. The build command first runs the Astro build, then Pagefind creates the index; the output is a static dist/ directory that can be deployed to any static host.
In terms of limitations, the README notes that the contact form requires integrating Formspree or a similar service, and real submissions require configuring an endpoint yourself, whose quotas and fees must be checked separately. Third-party assets such as images, fonts, and icons in the demo must be assessed under their respective licenses and cannot be considered freely usable solely on the basis of the code's MIT license. External services such as domains and hosting may also incur costs.
Is it right for your project?
Use Cases
- Building magazine, journal, or independent publishing content sites
- Creating an article-reading-focused blog for writers that needs a table of contents and full-text search
- Needing to organize articles by category and author and automatically generate archive pages
- Deploying to static hosts such as Cloudflare Pages, Netlify, Vercel, or GitHub Pages
Suitable For
- Individuals or teams accustomed to writing in Markdown/MDX and wanting to manage content with Astro
- Blog projects that need light/dark mode, full-text search, and basic SEO output
- Publication sites focused on editorial typography and long-form reading
- Sites that want to deploy static output to any static host without relying on server-side search
Getting started & customization
Use these recorded setup notes alongside the repository instructions for your chosen version.
- 1
After cloning the repository, run npm install, then use npm run dev to preview locally
- 2
Site title, description, navigation, author toggle, social and share links, and other settings are modified in src/config.json
- 3
Articles go in src/content/posts/, and frontmatter supports fields such as title, description, pubDate, author, category, featured, and image
- 4
Build with npm run build, which first runs the Astro build and then has Pagefind create the index; deploy the dist/ directory
- 5
The contact form requires integrating Formspree or a similar service yourself and configuring an endpoint; its quotas and fees must be checked separately
License & source material
Usage conditions & limitations
Free to use · keep license noticeThis entry covers the free version under the MIT license in the public repository; the free scope is the code of that version and does not mean external services or third-party assets are free.
Must comply with when using
- You are allowed to use, modify, commercialize, and distribute the code of this version for free.
- When distributing copies or substantial portions of the code, retain the original author's copyright notice and the complete MIT license notice.
- The code is provided as is; warranties and limitations of liability are governed by the original license and applicable law.
Additional costs & items to verify
- The contact form is a static page and requires integrating Formspree or a similar third-party service yourself and configuring a submission endpoint; that service's available quota, privacy terms, and fees must be checked separately and are not a built-in feature of the theme.
- Deployment requires your own static hosting service (such as Cloudflare Pages, Netlify, Vercel, or GitHub Pages); domains and hosting may incur costs that you must confirm yourself.
- The licenses for third-party assets such as fonts, images, and icons used in the demo must be verified separately according to their respective sources and cannot be considered freely usable solely on the basis of the code's MIT license.
- The README mentions the Formspree form service; real submissions require configuring a service endpoint, and its usage quotas and fees must be checked separately.
- Demo images, fonts, icons, and other third-party assets must be checked under their respective licenses and cannot be judged solely on the basis of the code's MIT license.
- External services such as domains, hosting, databases, payments, or AI may incur additional charges.
View Original Text Basis
Permission is hereby granted, free of charge
Original License Text
Contact form (connect to Formspree or similar)
Original README
Deploy the `dist/` folder to any static host
Original README
https://github.com/Liteink/margin/blob/main/LICENSEhttps://github.com/Liteink/margin/blob/main/README.md[Fraunces](https://fonts.google.com/specimen/Fraunces)
Original README
Compiled by DeepSeek based on repository license and README ·2026-10-02. Results only cover the materials read; dependencies, images, fonts, and subsequent term changes are subject to their respective original texts.
Project checks & description sources
Template Information
- Source platforms
- GitHub
- Documentation and maintenance reference score
- More documented · 80 / 100
- Technologies
- Astro
- Website type
- Blog
How this score is calculated
Our heuristic uses license records (up to 30), a demo link (12), a preview (10), stars (15), recorded maintenance (15), description completeness (8), feature records (5) and classification data (5). It is not a code, security or performance test, or a Google score. A link does not establish tested functionality.
What to verify for this project
- Repository update recorded
- 2026-08-11
- Screenshot last checked
- 2026-10-02
A demo link is listed. Check it with your own content and viewport sizes; its presence does not confirm that forms, authentication or payments work.
The catalog identifies Astro as the primary stack. Check the actual dependency manifest and lockfile for versions and hosting requirements. These notes use recorded metadata, not a code audit or a deployment test.
Use a selection guide →How this description was prepared
AI-assisted description based on catalog records and repository material. Repository authors are not automatically the reviewers of this description.
Automatically checked against source and license rules; no manual editorial review.
Inspect the recorded source material
SHA-256: 48e08d8a643720b71687fd061e598efabd43539e2f7e084027f9e3e914548bd0
2026-10-02T06:41:21.576Z
Source file / repository# Margin — A Dark Editorial Astro Theme
A high-contrast editorial theme for magazines, journals, and independent publications. Built for writers who want their words to do the talking.
[Live Demo](https://astro-uzen-theme.pages.dev) · [License: MIT](./LICENSE)

## Features
- **Light & Dark Mode** — System-aware with manual toggle, persisted via localStorage
- **Full-Text Search** — Powered by [Pagefind](https://pagefind.app), zero server required
- **Table of Contents** — Auto-generated with scroll spy on every post
- **Content Collections** — Write posts in Markdown, manage with Astro's built-in content layer
- **Author Profiles** — Dedicated author pages with post listings
- **Category Archives** — Organized by category with clean grid layouts
- **Social Sharing** — Built-in share buttons for Twitter/X, Facebook
- **RSS Feed** — Auto-generated at `/rss.xml`
- **Sitemap** — Auto-generated, includes all pages
- **Syntax Highlighting** — Styled code blocks for technical writing
- **SEO Ready** — Open Graph, Twitter Cards, JSON-LD structured data, canonical URLs
- **Zero JS by Default** — Astro ships pure static HTML. Pagefind JS loads only on the search page
- **Responsive** — Hand-tuned breakpoints for mobile, tablet, and desktop
- **Accessible** — Semantic HTML, keyboard navigation, ARIA labels, visible focus states
## Tech Stack
| Tool | Purpose |
|---|---|
| [Astro 7](https://astro.build) | Static site generator |
| [Tailwind CSS 3](https://tailwindcss.com) | Utility-first styling |
| [Pagefind](https://pagefind.app) | Static site search |
| [Fraunces](https://fonts.google.com/specimen/Fraunces) | Display serif |
| [Inter](https://fonts.google.com/specimen/Inter) | Body sans-serif |
| [JetBrains Mono](https://fonts.google.com/specimen/JetBrains+Mono) | Code & metadata |
## Quick Start
```bash
git clone https://github.com/Liteink/margin.git
cd margin
npm install
npm run dev
```
Visit `http://localhost:4321` to see your site.
## Configuration
All site settings live in `src/config.json`:
```json
{
"siteTitle": "Margin",
"siteDescription": "Your site description",
"navigation": [
{ "label": "Home", "href": "/" },
{ "label": "Technology", "href": "/category/technology" }
],
"enableAuthor": true,
"socialLinks": [...],
"shareLinks": [...],
"footer": { ... }
}
```
## Writing Posts
Create Markdown files in `src/content/posts/`:
```yaml
---
title: "Your Post Title"
description: "A one-line summary for SEO and social cards."
pubDate: 2026-01-15
author: "Author Name"
category: "Design"
featured: false
image:
url: "/images/cover.jpg"
alt: "Description of the cover image"
---
Your content here. Markdown and MDX are both supported.
```
Categories, author pages, and RSS feeds are generated automatically from frontmatter.
## Design System
| Token | Dark | Light |
|---|---|---|
| Background | `#0e0a0c` | `#faf8f6` |
| Surface | `#131012` | `#f0ede8` |
| Ink (headlines) | `#f5f0ea` | `#1a1115` |
| Body text | `#9a9088` | `#524c4a` |
| Accent | `#d4324a` | `#d4324a` |
Colors are defined as CSS custom properties in `Layout.astro`. Change them once, and the entire theme updates.
## Deployment
Build the site with search indexing:
```bash
npm run build
```
This runs Astro build, then Pagefind indexes the output. Deploy the `dist/` folder to any static host:
- **Cloudflare Pages** — Connect repo, set build command to `npm run build`
- **Netlify** — Same as above
- **Vercel** — Same as above
- **GitHub Pages** — Use the `dist/` folder as the publish directory
## Pages
- **Home** — Featured story + article grid + editor's picks + newsletter CTA
- **Post** — Full article with cover image, TOC sidebar, share buttons, related stories
- **Category** — `/category/[name]` — Posts filtered by category
- **Author** — `/author/[name]` — Posts by a specific author
- **Search** — `/search` — Full-text search powered by Pagefind
- **Subscribe** — Newsletter signup page
- **Contact** — Contact form (connect to Formspree or similar)
- **Privacy / Terms** — Legal pages via Markdown content collection
- **404** — Custom not-found page
## License
**MIT** — Free for personal and commercial use. No attribution required.
---
Built by [LiteInk](https://github.com/Liteink)
Explore similar templates
Compare previews and descriptions within the same stack and category.

astrowind
AstroWind is a free, open-source Astro starter theme using Astro and Tailwind CSS, released under the MIT license.
Astro · Blog

astro-paper
AstroPaper is a minimal, responsive, accessible, and SEO-friendly Astro blog theme. Articles are stored as Markdown/MDX in src/content/posts/, with subdirectories affecting URLs.
Astro · Blog

fuwari
Fuwari is a static blog template built with Astro and Tailwind CSS for personal blogs. It manages posts as Markdown files in src/content/posts/, with frontmatter for title, date, description, cover, tags, categories, draft status, and language.
Astro · Blog

Firefly
Firefly is a clean personal blog theme forked from Astro and Fuwari, offering four background modes, single/double sidebar and list/grid layouts, Pagefind client-side full-text search, and a six-language UI.
Astro · Blog

astro-theme-cactus
Astro Cactus is an Astro-based blog and portfolio theme that uses Markdown/MDX content collections to manage posts, notes, and tags, with frontmatter type-checked by a schema.
Astro · Portfolio

astrofy
Astrofy is a free and open-source personal portfolio website template built with Astro and TailwindCSS, with built-in blog, CV timeline, project showcase, store, and RSS feed modules.
Astro · Portfolio
