Skip to content

skywardpixel/reverie-blog-astro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

56 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Reverie - Elegant Astro Blog Template

A thoughtful, minimalist blog template built with Astro, featuring multiple beautiful themes and a focus on readability and personal expression. Perfect for writers, developers, and creatives who want an elegant online presence.

Reverie Blog Template

✨ Features

  • 🎨 Multiple Themes: Six carefully crafted color themes to match your personality
  • πŸ“ MDX Support: Write blog posts with components inside markdown
  • πŸ“± Fully Responsive: Beautiful on desktop, tablet, and mobile devices
  • ⚑ Blazing Fast: Built with Astro for optimal performance
  • πŸ” SEO Optimized: Meta tags, Open Graph, sitemap, and RSS feed
  • β™Ώ Accessible: WCAG compliant with proper contrast and semantic HTML
  • 🎯 Reading-Focused: Clean typography and distraction-free reading experience
  • 🌏 Chinese Typography: Full support for Chinese content with optimized fonts and layout
  • πŸ“Š Reading Time: Automatic reading time calculation
  • 🏷️ Tag System: Organize posts with tags that adapt to your theme
  • πŸ”— Social Sharing: Built-in sharing buttons for social platforms

🎨 Available Themes

  • Sage Green: Calming and natural, perfect for thoughtful writing
  • Soft Lavender: Creative and thoughtful with artistic flair
  • Warm Terracotta: Earthy and cozy with Mediterranean warmth
  • Dusty Rose: Gentle and romantic with soft elegance
  • Warm Honey: Golden and inviting with optimistic energy
  • Warm Steel: Trustworthy and balanced with professional warmth

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • npm, yarn, or pnpm

Installation

  1. Clone or download the template:
git clone https://github.com/yourusername/reverie-blog-template.git
cd reverie-blog-template
  1. Install dependencies:
npm install
  1. Start the development server:
npm run dev
  1. Open http://localhost:4321 in your browser

πŸ“ Writing Blog Posts

Blog posts are written in MDX format and stored in src/content/blog/. Each post should have frontmatter with the following structure:

---
title: 'Your Post Title'
description: 'A brief description of your post'
publishDate: 2024-01-15
updatedDate: 2024-01-20
heroImage: 'https://example.com/image.jpg'
tags: ['writing', 'thoughts', 'life']
draft: false
---

Your content here with full MDX support...

## You can use markdown

And even import components:

<CustomComponent />

Frontmatter Fields

  • title (required): The title of your blog post
  • description (required): A brief description for SEO and previews
  • publishDate (required): Publication date (YYYY-MM-DD format)
  • updatedDate (optional): Last update date
  • heroImage (optional): Hero image URL for the post
  • tags (optional): Array of tags for categorization
  • draft (optional): Set to true to hide the post from production

🎨 Customizing Your Theme

Changing the Active Theme

Edit src/config/site.ts to change the theme:

export const siteConfig = {
  // ... other config
  theme: 'softLavender', // Change to any theme name
};

Available themes: sageGreen, softLavender, warmTerracotta, dustyRose, warmHoney, warmSteel

Creating Custom Themes

Add new themes to the themes object in src/styles/themes.ts:

customTheme: {
  name: 'customTheme',
  displayName: 'Custom Theme',
  description: 'Your custom theme description',
  colors: {
    bg: '#your-bg-color',
    surface: '#your-surface-color',
    text: '#your-text-color',
    textSecondary: '#your-secondary-text',
    textTertiary: '#your-tertiary-text',
    accent: '#your-accent-color',
    accentLight: '#your-light-accent',
    border: '#your-border-color',
    borderLight: '#your-light-border',
  },
},

πŸ—οΈ Project Structure

β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ favicon.svg
β”‚   └── og-image.png
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ BlogCard.astro      # Blog post card component
β”‚   β”‚   β”œβ”€β”€ Navigation.astro    # Site navigation
β”‚   β”‚   └── ThemeProvider.astro # Theme system
β”‚   β”œβ”€β”€ config/
β”‚   β”‚   └── site.ts            # Site configuration
β”‚   β”œβ”€β”€ content/
β”‚   β”‚   β”œβ”€β”€ blog/              # Blog posts in MDX
β”‚   β”‚   └── config.ts          # Content collection config
β”‚   β”œβ”€β”€ layouts/
β”‚   β”‚   β”œβ”€β”€ BaseLayout.astro   # Base layout with theme
β”‚   β”‚   └── BlogPost.astro     # Blog post layout
β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”œβ”€β”€ blog/
β”‚   β”‚   β”‚   β”œβ”€β”€ [...slug].astro # Dynamic blog post pages
β”‚   β”‚   β”‚   └── index.astro     # Blog listing page
β”‚   β”‚   β”œβ”€β”€ about.astro         # About page
β”‚   β”‚   β”œβ”€β”€ index.astro         # Home page
β”‚   β”‚   β”œβ”€β”€ rss.xml.js         # RSS feed
β”‚   β”‚   └── themes.astro       # Theme showcase
β”‚   β”œβ”€β”€ styles/
β”‚   β”‚   └── global.css         # Global styles and design system
β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   └── reading-time.ts    # Reading time calculation
β”‚   └── env.d.ts              # TypeScript declarations
β”œβ”€β”€ astro.config.mjs           # Astro configuration
β”œβ”€β”€ package.json
└── tsconfig.json

πŸ› οΈ Development

Available Commands

Command Action
npm run dev Start development server at localhost:4321
npm run build Build production site to ./dist/
npm run preview Preview production build locally
npm run format Format all files with Prettier
npm run format:check Check if files need formatting

Code Quality

Reverie includes:

  • Prettier for consistent code formatting
  • TypeScript for type safety
  • ESLint-ready structure for linting

πŸ“¦ Building for Production

  1. Build the site:
npm run build
  1. Preview the production build:
npm run preview
  1. Deploy the dist/ folder to your hosting provider

πŸš€ Deployment

Netlify

Deploy to Netlify

Vercel

Deploy with Vercel

GitHub Pages

Update astro.config.mjs with your site details:

export default defineConfig({
  site: 'https://yourusername.github.io',
  base: '/your-repo-name', // Only needed for repo deployments
});

🎯 Performance

Reverie is built for performance:

  • 100/100 Lighthouse Score achievable
  • Minimal JavaScript - mostly static HTML/CSS
  • Optimized Images with Astro's built-in optimization
  • Fast Navigation with prefetching
  • Small Bundle Size - under 50KB of JavaScript
  • Easy Customization - Config-driven approach

πŸ“± Browser Support

  • βœ… Chrome (latest)
  • βœ… Firefox (latest)
  • βœ… Safari (latest)
  • βœ… Edge (latest)
  • βœ… Mobile browsers

🀝 Contributing

Contributions are welcome! Feel free to:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Built with Astro - The web framework for content-driven websites
  • Typography inspired by Medium and Ghost
  • Color palettes designed for accessibility and beauty
  • Icons from Feather Icons

πŸ’¬ Support

If you find this template helpful, please consider:

  • ⭐ Starring the repository
  • πŸ› Reporting bugs via GitHub Issues
  • πŸ’‘ Suggesting features via GitHub Discussions
  • πŸ“ Writing about your experience using Reverie

Reverie - A thoughtful space for your words

Built with ❀️ for writers, creators, and dreamers.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •