Revista is a free, open-source blog and magazine template built on Astro v5 that transforms Markdown/MDX posts or Sanity CMS content into a complete, SEO-optimized content site with automatic categories and featured sections.
What is Revista?
Revista is a static site template created by Chris Morrison (mesmerdesign.ca) and migrated from an earlier open-source Gatsby blog template. It runs on Astro v5.6.3 with React 19.2.3 for interactive components, TypeScript 5.7.2 for type safety, MDX for Markdown with JSX, and Sass for styling. Input is either Markdown/MDX files placed in src/content/posts or content managed in a Sanity CMS; output is a fully static site with pages for homepage, about, categories, contact, dynamic category listings, and individual post routes. The template is distributed under the MIT license and available on GitHub.
Key Features
- Astro v5 static generation — Ships zero JavaScript by default; only interactive components are hydrated, keeping initial bundle size minimal.
- Dual content providers — Choose Markdown/MDX files by default or switch to Sanity CMS via a PUBLIC_CONTENT_PROVIDER environment variable; content schemas are validated with Zod.
- Automatic categories — Categories are generated automatically from each post's frontmatter category field, with no manual configuration; category colors are set in src/utils/heroCategories.ts.
- Built-in featured sections — Homepage includes hero with category links, Top Articles, Trending, and Popular post sections driven by frontmatter flags like trending, topPick, and popular.
- Reading time and SEO — Automatic reading-time calculation and built-in meta tags, Open Graph, and structured data for search visibility.
- Optional contact form — Powered by StaticForms.xyz, activated by setting PUBLIC_STATICFORMS_API_KEY in the environment.
- Responsive design and organized SCSS — Mobile-first layout with modular SCSS architecture; colors and fonts are customized through CSS variables in src/css/main.css.
Who is it for?
- Personal bloggers who want a fast, minimal Markdown-based publishing workflow with zero build configuration beyond writing posts.
- Magazine-style publications that need categories, trending/top pick sections, and a prominent hero to surface multiple article types.
- Developers building content or documentation sites who want TypeScript safety, component reuse, and easy deployment to Netlify, Vercel, Cloudflare Pages, or GitHub Pages.
- Content teams already using Sanity CMS who need a static front end; set PUBLIC_CONTENT_PROVIDER=sanity and connect project ID and dataset.
What can you do with Revista?
- Write and publish posts in Markdown — Create a file in src/content/posts with frontmatter for title, image, date, category, and featured flags; the build generates the post page and adds it to the correct category archive.
- Manage content via Sanity — Switch the content provider to Sanity and use its studio to author posts, with the template fetching content at build time using the configured dataset and API version.
- Customize the design — Change primary and text colors by editing CSS variables such as --primary-8 and --grey-8, swap fonts in BaseLayout.astro, and add new pages by placing .astro files in src/pages.
- Deploy to any static host — Build with npm run build to produce a dist folder that works on Netlify, Vercel, Cloudflare Pages, GitHub Pages, AWS S3, or Firebase Hosting.
How does Revista work?
After cloning the repository and running npm install, you start the dev server with npm run dev at localhost:4321. Write posts as Markdown/MDX files in src/content/posts with frontmatter fields, and the site updates automatically; categories are derived from the category field. For production, run npm run build to output a static dist directory ready for any static hosting service.
Pricing
Revista is free and open source under the MIT license. There are no paid tiers, and the only optional paid services are external: Sanity CMS for content management and StaticForms.xyz for the contact form, both self-hosted at your discretion.
FAQ
Is Revista free?
Yes, Revista is completely free to use under the MIT license. You can clone the repository, modify it, and deploy it to any static host without paying licensing fees.
What content formats does Revista support?
Revista supports two content providers: Markdown/MDX files placed in src/content/posts, and Sanity CMS. The default is Markdown, and you switch to Sanity by setting PUBLIC_CONTENT_PROVIDER=sanity plus your Sanity project credentials.
How do I install Revista?
Clone the repository from GitHub, install dependencies with npm, yarn, or pnpm, copy env.example to .env for optional variables, and run npm run dev to start the development server at localhost:4321. Node.js 18 or newer is required.
Does Revista have a contact form?
Yes, Revista includes an optional contact form powered by StaticForms.xyz. To enable it, set PUBLIC_STATICFORMS_API_KEY and PUBLIC_STATICFORMS_REDIRECT_URL in your .env file.
Can I deploy Revista to GitHub Pages?
Yes, GitHub Pages is supported. Update the site and base fields in astro.config.mjs to match your repository URL, then build and deploy using GitHub Actions or manually.





