Back to templates

Template details

Daybook

A diary-first Astro blog theme with month-grouped daily entries, full-text search, dark mode, comments, and optional password-locked posts.

About this template

Daybook is an Astro-based static blog theme built around daily diary entries: one short entry per day, automatically grouped by month, rendered on a paper-white page with a left-hand date rail that makes the timeline scannable at a glance. Written in Markdown and built with Astro, it outputs a quiet, searchable personal blog suitable for any static host. The project is maintained by God-2077 and licensed under AGPL-3.0, with a live preview at daybook.demo.ksable.top.

What is Daybook?

Daybook is a static site theme for Astro that takes Markdown files as input and produces a pre-built personal blog in a dist/ directory. Daily entries live in src/content/daily/ and support frontmatter fields including date, category, updated, description, slug, permalink, draft, pin, password, hideFrom, and comments. Longer articles go in src/content/post/ with categories, tags, and keywords. The theme requires Node.js 22.23.4 or newer and pnpm, and it can be deployed to Vercel, Cloudflare Pages, or Netlify with build command pnpm build and output directory dist.

Key Features

  • Diary-first layout — one entry per day, auto-grouped by month with a left date rail; long posts collapse on the home page behind an "expand full text" toggle.
  • Full-text search — a search index is generated at build time, with input-as-you-type results filterable by diary, article, or page.
  • Dark mode — follows the system preference or switches manually, with no white flash on toggle.
  • Pinned entries and drafts — pinned diaries form their own group; drafts appear only in local development.
  • Password-protected posts — add a password in frontmatter to lock a single entry's body.
  • Comments — connect Twikoo, Waline, or Artalk at any time.
  • Content enhancements — side table of contents, code highlighting, math formulas, image lightbox via lightGallery, and footnotes.
  • Archive and writing heatmap — review all content by year and month, with a heatmap showing which days have entries.
  • RSS, sitemap, and sharing — three RSS feeds, sitemap, robots file, and OG link-card preview images.
  • Music page — embed a playlist of favorite songs with an in-site player (Meting MDX client supported).
  • Multilingual UI — one build outputs one of Simplified Chinese, Traditional Chinese, English, or Japanese.
  • Mobile-friendly navigation — the nav collapses on small screens; bottom navigation is configurable or can be disabled.
  • Optional split theme/content repos — clone or pull a separate content repository with pnpm content:clone, pnpm dev:content, and pnpm content:pull, so writing commits stay out of theme history.

Who is it for?

  • Daily journalers who want a quiet, no-card, no-shadow personal site where each day gets one page and the timeline stays legible.
  • Developers who write in Markdown and prefer a static Astro build over a database-backed blog platform.
  • Bloggers mixing short notes and long posts who need diaries and articles in separate content collections with their own metadata.
  • Privacy-minded writers who want to lock individual entries with a password rather than the whole site.

How does Daybook work?

Clone the repository, run pnpm install, then pnpm dev to start a local server at localhost:4321. Edit src/config/site.ts for title, subtitle, author, and real domain; create a .md file in src/content/daily/ for the first entry; run pnpm build to generate dist/ and upload it to any static host. Optional content-repo mode fills CONTENT_REPO_URL in .env and uses the :content script variants.

FAQ

Is Daybook free?

Yes. Daybook is open source under the GNU Affero General Public License version 3 (AGPL-3.0). The only third-party licensing note in the docs concerns lightGallery (GPLv3 or commercial) used for image zoom, and the Chill Round font subset (OFL-1.1).

What Astro version and Node version does Daybook require?

The README states Node.js 22.23.4 or newer plus pnpm. The theme is built on Astro, with TypeScript config files validated at build time so a wrong field fails the build with its location reported.

Can I keep my diary content in a separate Git repository?

Yes. Daybook supports an optional split-repo mode: prepare a content/ folder, set CONTENT_REPO_URL in .env, run pnpm content:clone, and use pnpm dev:content or pnpm build:content, updating with pnpm content:pull. Static assets go in content/public/.

Which comment systems can I connect?

Daybook supports Twikoo, Waline, and Artalk, configured through the site config TypeScript file. Comment inclusion can also be turned off per entry via the comments frontmatter field.

Screenshot of Daybook