A beautiful, modern blog template built with Gatsby, TypeScript, and styled-components.
- ⚡ Lightning Fast - Built with Gatsby for optimal performance
- 📱 Fully Responsive - Beautiful on all devices and screen sizes
- 🔧 TypeScript - Full type safety and better developer experience
- 📝 Markdown Support - Write posts in Markdown with frontmatter
- 🎯 SEO Optimized - Built-in SEO optimization and meta tags
- ♿ Accessible - WCAG compliant with proper ARIA labels
- 🚀 Modern Stack - React 18, styled-components, and latest dependencies
-
Install dependencies
npm install
-
Start development server
npm run develop
-
Open your browser Navigate to
http://localhost:8000
gatsby-blog-template/
├── src/
│ ├── components/ # Reusable React components
│ │ ├── Header.tsx
│ │ ├── Footer.tsx
│ │ └── Layout.tsx
│ ├── pages/ # Page components
│ │ ├── index.tsx # Home page
│ │ ├── blog.tsx # Blog listing page
│ │ └── about.tsx # About page
│ ├── templates/ # Page templates
│ │ └── blog-post.tsx # Individual blog post template
│ ├── content/blog/ # Blog posts in Markdown
│ ├── styles/ # Global styles and theme
│ └── images/ # Static images
├── gatsby-config.ts # Gatsby configuration
├── gatsby-node.ts # Gatsby Node APIs
└── package.json
Create new blog posts by adding Markdown files to src/content/blog/. Each post should have frontmatter:
---
title: "Your Post Title"
date: "2024-01-15"
description: "A brief description of your post"
tags: ["tag1", "tag2", "tag3"]
---
# Your post content here
Write your content in Markdown...Edit src/styles/GlobalStyles.ts to customize colors, typography, and spacing:
// Update gradient colors
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
// Update text colors
color: rgba(255, 255, 255, 0.8);Update site information in gatsby-config.ts:
siteMetadata: {
title: `Your Blog Name`,
description: `Your blog description`,
author: `@yourusername`,
siteUrl: `https://your-blog.com`,
},This template generates 100% static files and can be hosted on any static hosting service.
npm run buildThis creates a public/ folder with all static files ready for deployment.
# Build settings:
Build command: npm run build
Publish directory: publicnpm i -g vercel
vercel --prod- Push to GitHub
- Enable GitHub Actions (included in
.github/workflows/) - Your site will be available at
https://username.github.io/repository-name
Upload the contents of public/ folder to any web server:
- AWS S3 + CloudFront
- Firebase Hosting
- Surge.sh
- Any traditional web hosting
- No server required - Just HTML, CSS, JS files
- Lightning fast - Served from CDN edge locations
- Highly secure - No server-side vulnerabilities
- Cost effective - Many free hosting options
- Scalable - Handles traffic spikes effortlessly
npm run develop- Start development servernpm run build- Build for productionnpm run serve- Serve production build locallynpm run clean- Clean Gatsby cachenpm run type-check- Run TypeScript type checking
- Gatsby - Static site generator
- React - UI library
- TypeScript - Type safety
- styled-components - CSS-in-JS styling
- GraphQL - Data querying
This project is open source and available under the MIT License.
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
If this project helped you, please give it a ⭐ star on GitHub!