Uses Astro Content Collections to manage Markdown and MDX posts and notes, with frontmatter validated by schema
astro-citrus — Astro Blog Template
By ArtemKutsan
Astro Citrus is a minimalist blog template built on Astro that uses Content Collections to manage Markdown/MDX posts and notes, with built-in dark mode, Pagefind static search, RSS, sitemap, and OG image generation.
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.
Built-in light and dark themes, with styles controlled through TailwindCSS and CSS variables
Integrates Pagefind static search, generates an index after build, and supports filtering by tag
Automatically generates RSS, sitemap, robots.txt, and web app manifest
Uses Satori to automatically generate Open Graph PNG images for posts, and custom images can also be specified in frontmatter
Code blocks are rendered by Rehype Pretty Code, with rose-pine light and dark themes
Template Details
Astro Citrus is an Astro blog template maintained by ArtemKutsan, aimed at personal blogs or content sites. It uses Astro's Content Collections to organize Markdown/MDX files under src/content/post and src/content/note, and validates frontmatter with a schema in src/content/config.ts; posts support fields such as title, description, publication date, update date, series, tags, cover image, custom OG image, and draft status. Site metadata is centralized in src/site.config.ts, and styles are controlled through TailwindCSS utility classes and CSS variables in src/styles/global.css, providing light and dark themes. The template integrates Pagefind for static search; by default, the search scope covers only posts and notes, and the index must be generated by running the postbuild script after building.
Beyond content, the template also includes automatically generated RSS feeds, sitemap, robots.txt, and web app manifest, uses Satori to generate Open Graph images for posts that do not provide an ogImage, and supports Webmention. Code blocks are rendered by Rehype Pretty Code, with built-in rose-pine and rose-pine-dawn light and dark themes. Icons use the Astro Icon component, and social links are maintained in src/components/SocialList.astro.
In terms of usage limitations, Pagefind search is only available after the site is built; local preview requires running build first and then postbuild. By default, search does not include pages other than posts and notes; to extend it, you need to adjust the data-pagefind-body attribute. The template is under the MIT license, and the free scope is limited to the code of this version; third-party assets such as demo images, fonts, and icons need to be checked separately for their licenses, and external services such as domains and hosting may incur costs.
Is it right for your project?
Use Cases
- Building a personal blog or technical notes site written in Markdown/MDX
- Needing a lightweight content site with dark mode, RSS, and static search
- Wanting to use Astro's Content Collections for type validation of post frontmatter
- Needing to automatically generate Open Graph images for posts and output a sitemap and robots.txt
Suitable For
- Individual developers familiar with Astro and Markdown/MDX writing workflows
- Bloggers who prefer static generation and managing content through Git
- Site builders who need customizable theme styles and social links
Getting started & customization
Use these recorded setup notes alongside the repository instructions for your chosen version.
- 1
You can create a project with npm create astro@latest -- --template artemkutsan/astro-citrus or pnpm dlx create-astro --template artemkutsan/astro-citrus
- 2
Modify site metadata in src/site.config.ts, and set your own domain in astro.config.ts
- 3
Replace icon.svg and social-card.png in the public directory, and adjust the light and dark styles in src/styles/global.css as needed
- 4
Pagefind search requires running the postbuild script after building to generate the index; local preview requires build first and then postbuild
- 5
Posts and notes are placed in src/content/post and src/content/note respectively; refer to the README for frontmatter fields
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 limited to the code of this version and does not mean that external services or third-party assets are free.
Must comply with when using
- The code of this version may be used, modified, used commercially, and distributed 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
- Demo images, fonts, icons, and other third-party assets must be checked under their respective licenses and cannot be judged solely by the code's MIT license.
- External services such as domains, hosting, databases, payments, or AI may incur additional charges.
- Pagefind static search is only available after the site is built; the search function cannot be used directly in the development server.
- Local preview of the search function requires running build first and then the postbuild script; running dev alone will not produce a search index.
- The search scope by default covers only post and note pages; other pages are not indexed, and the data-pagefind-body attribute must be adjusted manually to extend it.
- The template does not include any analytics solution; if access statistics are needed, a third-party service must be integrated separately, which may involve external accounts and costs.
- When integrating an analytics service, it is usually necessary to manually insert the third-party-provided code snippet in the HEAD tag.
View Original Text Basis
Permission is hereby granted, free of charge
Original License Text
In its current form, pagefind only works once the site has been built.
Original README
This theme adds a postbuild script that should be run after Astro has built the site. You can preview locally by running both build && postbuild.
Original README
Search results only includes pages from posts and notes.
Original README
This theme/template doesn't include a specific solution due to there being a number of use cases and/or options which some people may or may not use.
Original README
https://github.com/ArtemKutsan/astro-citrus/blob/main/LICENSEhttps://github.com/ArtemKutsan/astro-citrus/blob/main/README.mdYou may be asked to included a snippet inside the **HEAD** tag of your website when setting it up
Original README
Compiled by DeepSeek based on repository license and README ·2026-10-04. 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
- Astro Themes
- Documentation and maintenance reference score
- More documented · 82 / 100
- Technologies
- Astro · HTML
- 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
- 2025-03-10
- Screenshot last checked
- 2026-10-04
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.
Review declaration: [email protected] · 2026-10-04
Inspect the recorded source material
SHA-256: 3f3b3a35cd03b37d146b54bffc83e6d3a5c98f08c36e07d1f7e23c646868cbd7
2026-10-04T09:40:26.825Z
Source file / repository<div align="center"> <img alt="Astro Citrus logo" src="https://github.com/ArtemKutsan/astro-citrus/blob/main/src/assets/images/logo.svg" width="70" /> </div> <h1 align="center"> Astro Citrus </h1> Astro Citrus is a simple opinionated starter built with the Astro framework. Use it to create an easy-to-use blog or website. ## Table Of Contents 1. [Key Features](#key-features) 2. [Demo](#demo) 3. [Quick start](#quick-start) 4. [Preview](#preview) 5. [Commands](#commands) 6. [Configure](#configure) 7. [Updating](#updating) 8. [Adding posts and notes](#adding-posts-and-notes) - [Post Frontmatter](#post-frontmatter) - [Note Frontmatter](#note-frontmatter) - [Frontmatter Snippet](#frontmatter-snippet) 9. [Pagefind search](#pagefind-search) 10. [Analytics](#analytics) 11. [Deploy](#deploy) 12. [Acknowledgment](#acknowledgment) ## Key Features - Astro v5 Fast 🚀 - TailwindCSS Utility classes - Accessible, semantic HTML markup - Responsive & SEO-friendly - Dark / Light mode, using Tailwind and CSS variables - MD & [MDX](https://docs.astro.build/en/guides/markdown-content/#mdx-only-features) posts & notes - Includes [Admonitions](http://astrocitrus.artemkutsan.pp.ua/posts/markdown-elements/admonistions/) - [Satori](https://github.com/vercel/satori) for creating open graph png images - [Automatic RSS feed](https://docs.astro.build/en/guides/rss) - [Webmentions](https://webmention.io/) - Auto-generated: - [sitemap](https://docs.astro.build/en/guides/integrations-guide/sitemap/) - [robots.txt](https://github.com/alextim/astro-lib/blob/main/packages/astro-robots-txt/README.md) - [web app manifest](https://github.com/alextim/astro-lib/blob/main/packages/astro-webmanifest/README.md) - [Pagefind](https://pagefind.app/) static search library integration - [Astro Icon](https://github.com/natemoo-re/astro-icon) svg icon component - [Rehype Pretty Code](https://rehype-pretty.pages.dev/) code blocks and syntax highlighter ## Demo Check out the [Demo](https://astrocitrus.netlify.app/) ## Quick start [Create a new repo](https://github.com/artemkutsan/astro-citrus/generate) from this template. ```bash # npm 7+ npm create astro@latest -- --template artemkutsan/astro-citrus # pnpm pnpm dlx create-astro --template artemkutsan/astro-citrus ``` [](https://app.netlify.com/start/deploy?repository=https://github.com/artemkutsan/astro-citrus) [](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fartemkutsan%2Fastro-citrus&project-name=astro-citrus) ## Preview |  |  | |-------------|-------------| |  |  | |  |  | |  |  | ## Commands Replace pnpm with your choice of npm / yarn | Command | Action | | :--------------- | :------------------------------------------------------------- | | `pnpm install` | Installs dependencies | | `pnpm dev` | Starts local dev server at `localhost:3000` | | `pnpm build` | Build your production site to `./dist/` | | `pnpm postbuild` | Pagefind script to build the static search of your blog posts | | `pnpm preview` | Preview your build locally, before deploying | | `pnpm sync` | Generate types based on your config in `src/content/config.ts` | ## Configure - Edit the config file `src/site.config.ts` for basic site meta data - Update file `astro.config.ts` - **Important**: the site property with your own domain. - [astro-webmanifest options](https://github.com/alextim/astro-lib/blob/main/packages/astro-webmanifest/README.md) - Replace & update files within the `/public` folder: - icon.svg - used as the source to create favicons & manifest icons - social-card.png - used as the default og:image - Modify file `src/styles/global.css` with your own light and dark styles. - You can also modify the theme(s) for markdown code blocks generated by [Rehype Pretty Code](https://rehype-pretty.pages.dev/). Astro Citrus has both a dark (rose-pine) and light (rose-pine-dawn) theme, which can be found in `src/site.config.ts`. You can find more theme(s) and options [here](https://shiki.matsu.io/). - Edit social links in `src/components/SocialList.astro` to add/replace your media profile. Icons can be found @ [icones.js.org](https://icones.js.org/), per [Astro Icon's instructions](https://www.astroicon.dev/guides/customization/#find-an-icon-set). - Create/edit posts & notes for your blog within `src/content/post/` & `src/content/note/` with .md/mdx file(s). See [below](#adding-posts-and-notes) for more details. - Read [this post](http://astrocitrus.artemkutsan.pp.ua/posts/webmentions/) for adding webmentions to your site. - OG Image: - If you would like to change the style of the generated image the Satori library creates, open up `src/pages/og-image/[slug].png.ts` to the markup function where you can edit the html/tailwind-classes as necessary. You can use this [playground](https://og-playground.vercel.app/) to aid your design. - You can also create your own og images and skip satori generating it for you by adding an ogImage property in the frontmatter with a link to the asset, an example can be found in `src/content/post/social-image.md`. More info on frontmatter can be found [here](#frontmatter) - Optional: - Fonts: This theme sets the body element to the font family `font-mono`, located in the global css file `src/styles/global.css`. You can change fonts by removing the variant `font-mono`, after which TailwindCSS will default to the `font-sans` [font family stack](https://tailwindcss.com/docs/font-family). ## Updating If you've forked the template, you can [sync the fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork) with your own project, remembering to **not** click Discard Changes as you will lose your own. If you have a template repository, you can add this template as a remote, as discussed [here](https://stackoverflow.com/questions/56577184/github-pull-changes-from-a-template-repository). ## Adding posts and notes This theme utilises [Content Collections](https://docs.astro.build/en/guides/content-collections/) to organise local Markdown and MDX files, as well as type-checking frontmatter with a schema -> `src/content/config.ts`. Adding a post/note is as simple as adding your .md(x) files to the `src/content/post` and/or `src/content/note` folder, the filename of which will be used as the slug/url. The posts included with this template are there as an example of how to structure your frontmatter. Additionally, the [Astro docs](https://docs.astro.build/en/guides/markdown-content/) has a detailed section on markdown pages. ### Post Frontmatter | Property (\* required) | Description | |------------------------|-------------| | **title \*** | Self-explanatory. Used as the text link to the post, the h1 on the post's page, and the page's title property. Has a max length of 60 chars, set in `src/content/config.ts`. | | **description \*** | Similar to above, used as the SEO description property. Has a min length of 50 and a max length of 160 chars, set in the post schema. | | **publishDate \*** | Again, pretty simple. To change the date format/locale, currently **en-GB**, update the date option in `src/site.config.ts`. Note you can also pass additional options to the `<FormattedDate>` component if required. | | **updatedDate** | This is an optional date representing when a post has been updated, in the same format as the `publishDate`. | | **seriesId** | An optional property that groups posts into a series. Posts with the same `seriesId` are considered part of the same series and can be displayed together in order. This allows for better organization of related content. | | **orderInSeries** | A numeric value defining the position of a post within a series. Lower values indicate earlier posts in the series, while higher values appear later. Used for sorting and navigation between posts within the same series. | | **tags** | Tags are optional with any created post. Any new tag(s) will be shown in `yourdomain.com/posts` & `yourdomain.com/tags`, and generate the page(s) `yourdomain.com/tags/[yourTag]`. | | **coverImage** | This is an optional object that will add a cover image to the top of a post. Include both `src`: "_path-to-image_" and `alt`: "_image alt_". You can view an example in `src/content/post/cover-image.md`. | | **ogImage** | This is an optional property. An OG Image will be generated automatically for every post where this property **isn't** provided. If you would like to create your own for a specific post, include this property and a link to your image, the theme will then skip automatically generating one. | | **draft** | This is an optional property as it is set to `false` by default in the schema. By setting it to `true`, the post will be filtered out of the production build in a number of places, including `getAllPosts()` calls, OG images, RSS feeds, and generated page[s]. You can view an example in `src/content/post/draft-post.md`. | ### Note Frontmatter | Property (\* required) | Description | | ---------------------- | -------------------------------------------------- | | title \* | string, max length 60 chars. | | description | to be used for the head meta description property. | | publishDate \* | ISO 8601 format with offsets allowed. | ### Frontmatter snippet Astro Citrus includes a helpful VSCode snippet which creates a frontmatter 'stub' for posts and note's, found here -> `.vscode/post.code-snippets`. Start typing the word `frontmatter` on your newly created .md(x) file to trigger it. Visual Studio Code snippets appear in IntelliSense via (⌃Space) on mac, (Ctrl+Space) on windows. ## Pagefind search This integration brings a static search feature for searching blog posts and notes. In its current form, pagefind only works once the site has been built. This theme adds a postbuild script that should be run after Astro has built the site. You can preview locally by running both build && postbuild. Search results only includes pages from posts and notes. If you would like to include other/all your pages, remove/re-locate the attribute `data-pagefind-body` to the article tag found in `src/layouts/BlogPost.astro` and `src/components/note/Note.astro`. It also allows you to filter posts by tags added in the frontmatter of blog posts. If you would rather remove this, remove the data attribute `data-pagefind-filter="tag"` from the link in `src/components/blog/Masthead.astro`. If you would rather not include this integration, simply remove the component `src/components/Search.astro`, and uninstall both `@pagefind/default-ui` & `pagefind` from package.json. You will also need to remove the postbuild script from here as well. You can reduce the initial css payload of your css, as demonstrated [here](https://github.com/artemkutsan/astro-citrus/pull/145#issue-1943779868), by lazy loading the web components styles. ## Analytics You may want to track the number of visitors you receive to your blog/website in order to understand trends and popular posts/pages you've created. There are a number of providers out there one could use, including web hosts such as [vercel](https://vercel.com/analytics), [netlify](https://www.netlify.com/products/analytics/), and [cloudflare](https://www.cloudflare.com/web-analytics/). This theme/template doesn't include a specific solution due to there being a number of use cases and/or options which some people may or may not use. You may be asked to included a snippet inside the **HEAD** tag of your website when setting it up, which can be found in `src/layouts/Base.astro`. Alternatively, you can add the snippet in `src/components/BaseHead.astro`. ## Deploy [Astro docs](https://docs.astro.build/en/guides/deploy/) has a great section and breakdown of how to deploy your own Astro site on various platforms and their idiosyncrasies. By default the site will be built (see [Commands](#commands) section above) to a `/dist` directory. ## Acknowledgment **This theme was inspired by [Astro Theme Cactus](https://github.com/chrismwilliams/astro-theme-cactus) by [Chriss Williams](https://github.com/chrismwilliams). Huge thanks to Chriss for his amazing work and inspiration!** 🚀👏 ## License MIT
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
