- Monochrome Elegance: Clean black and white design that puts content first
- Minimal Aesthetic: Less is more - every element serves a purpose
- Typography-Focused: Beautiful typography hierarchy for excellent readability
- Dark/Light Mode: Seamless theme switching with system preference detection
- Persistent Settings: Theme choice saved in localStorage
- Smooth Transitions: Elegant animations between theme changes
- Mobile-First: Optimized for all screen sizes
- Max-Width Design: 1000px container for optimal reading experience
- Touch-Friendly: Perfect interaction on mobile devices
- Astro Content Collections: Type-safe content management with schema validation
- Markdown Support: Write your posts in Markdown with frontmatter
- Rich Metadata: Support for categories, tags, publication dates, and featured posts
- Categories System: Organize posts by categories with dedicated pages
- Tags System: Flexible tagging with tag-specific pages
- Featured Posts: Highlight your best content on the homepage
- Multi-Author Support: Full multi-author blog support with author pages and filtering
- Smart Pagination: Navigate through posts with numbered pagination
- SEO-Friendly URLs: Clean URLs for all paginated pages
- Page Info: Clear indication of current page and total posts
- Responsive Controls: Touch-friendly pagination on mobile
- Thumbnail Images: Featured post thumbnails for visual appeal
- Large Images: Full-size images for detailed article views
- Lazy Loading: Optimized image loading for better performance
- Responsive Images: Adaptive image sizing for different screens
- Static Generation: Lightning-fast loading with pre-built pages
- Minimal Dependencies: Clean codebase with essential dependencies only
- Optimized Assets: Compressed and optimized for web delivery
- SEO Ready: Meta tags and OpenGraph support
- Author Pages: Dedicated pages for each author with their post listings
- Author Navigation: Browse all authors with post counts on
/authors - Clickable Author Links: Author names link to their individual pages
- Flexible Attribution: Easy author assignment via frontmatter
- Multiple Authors: Support for any number of blog contributors
- Node.js 18+ or Bun
- Git
# Clone the repository
git clone https://github.com/hasinhayder/storyteller-astro.git
cd storyteller-astro
# Install dependencies
bun install
# or
npm install
# or
pnpm install
# Start development server
bun dev
# or
npm run dev
# or
pnpm devYour blog will be available at http://localhost:4321
π¦ Storyteller/
βββ π public/
β βββ πΌοΈ images/ # Static images
β βββ π favicon.svg # Site favicon
β βββ π scripts/ # Client-side scripts
βββ π src/
β βββ π components/ # Reusable Astro components
β β βββ π§© Header.astro # Navigation & theme toggle
β β βββ π§© PostCard.astro # Blog post preview
β β βββ π§© FeaturedCard.astro # Featured post card
β β βββ π§© Pagination.astro # Pagination component
β βββ π content/ # Content collections
β β βββ π config.ts # Content schema
β β βββ π article/ # Blog posts (Markdown)
β βββ π layouts/ # Page layouts
β β βββ π¨ BlogLayout.astro # Main blog layout
β βββ π pages/ # Astro pages
β β βββ π index.astro # Homepage
β β βββ π blog/ # Paginated blog pages
β β βββ π article/ # Individual articles
β β βββ π author/ # Author pages
β β βββ π category/ # Category pages
β β βββ π tag/ # Tag pages
β βββ π styles/ # Global styles
βββ π package.json # Dependencies & scripts
Create a new .md file in src/content/article/:
---
title: "Your Amazing Post Title"
description: "A compelling description of your post"
pubDate: 2025-01-15
author: "Your Name" # Author name (defaults to "Hasin Hayder")
category: "Technology"
tags: ["astro", "web development", "javascript"]
featured: true # Optional: mark as featured
thumb: "https://images.unsplash.com/photo-example?w=400" # Thumbnail
large: "https://images.unsplash.com/photo-example?w=1200" # Large image
---
Your amazing content goes here! Write in Markdown format.
## Subheading
You can use all standard Markdown features...| Field | Type | Required | Description |
|---|---|---|---|
title |
String | β | Post title |
description |
String | β | SEO description |
pubDate |
Date | β | Publication date |
author |
String | β | Author name (defaults to "Hasin Hayder") |
category |
String | β | Post category |
tags |
Array | β | Post tags |
featured |
Boolean | β | Mark as featured |
thumb |
String | β | Thumbnail image URL |
large |
String | β | Large image URL |
The theme uses Tailwind CSS for styling. Key customization areas:
- Colors: Modify the monochrome palette in
src/layouts/BlogLayout.astro - Typography: Adjust font sizes and weights in Tailwind classes
- Spacing: Customize margins and padding throughout components
The dark/light mode system is powered by:
public/scripts/theme-toggle.js- Client-side theme logic- CSS variables for color switching
- localStorage for persistence
Customize the navigation in src/components/Header.astro:
- Add/remove menu items
- Modify the profile section
- Adjust the theme toggle button
| Command | Action |
|---|---|
bun install |
Install dependencies |
bun run dev |
Start development server at localhost:4321 |
bun run build |
Build production site to ./dist/ |
bun run preview |
Preview build locally |
| Command | Action |
|---|---|
npm install |
Install dependencies |
npm run dev |
Start development server at localhost:4321 |
npm run build |
Build production site to ./dist/ |
npm run preview |
Preview build locally |
| Command | Action |
|---|---|
pnpm install |
Install dependencies |
pnpm dev |
Start development server at localhost:4321 |
pnpm build |
Build production site to ./dist/ |
pnpm preview |
Preview build locally |
Edit src/site.config.mjs for global settings:
export default {
// Basic Site Information
siteTitle: "The Storyteller", // Main site title
siteSubTitle: "Minimal musings on code, design, and life", // Subtitle/tagline
copyright: "Β© 2025 The Storyteller. All Rights Reserved.", // Footer copyright text
// Homepage Display Options
showAuthorsOnHomePage: false, // Show author info on homepage
showFeaturrdPostsOnHomePage: true, // Display featured posts section
showCategoryOnPosts: true, // Display categories on posts in homepage
numberOfLatestPostsPerPage: 6, // Number of latest posts on homepage
numberOfBlogPostsPerPage: 8, // Number of posts per paginated blog page
// UI Labels (Customizable Text)
labels: {
featuredPosts: "Featured Posts", // Featured section title
latestPosts: "Latest Posts", // Latest posts section title
viewAllPosts: "View All Posts", // Link text to paginated blog
backToHome: "Back to Home", // Back navigation text
youMightAlsoLike: "You Might Also Like", // Similar posts section title
postedIn: "Posted in", // Category prefix text
noArticlesFound: "No articles found.", // Empty state message
allCategories: "All Categories", // Categories page title
allTags: "All Tags", // Tags page title
allAuthors: "All Authors", // Authors page title
exploreArticlesByTags: "Explore articles organized by topics", // Tags page description
exploreArticlesByCategories: "Explore articles organized by topics", // Categories page description
exploreArticlesByAuthors: "Explore articles organized by authors", // Authors page description
},
// Pagination Configuration
pagination: {
showPrevNext: true, // Show Previous/Next navigation buttons
prevText: "Previous", // Text for previous page button
nextText: "Next", // Text for next page button
postLabel: "posts", // Label used in pagination info (e.g., "8 posts")
},
// Default Author Settings
defaultAuthorName: "Hasin Hayder", // Default author name for posts without explicit author
// Footer Navigation
showCategoriesLinkOnFooter: true, // Show Categories link in footer
showTagsLinkOnFooter: true, // Show Tags link in footer
showAuthorsLinkOnFooter: true, // Show Authors link in footer
// Post Display Options
showSimilarPosts: true, // Show similar posts on article pages
showReadMoreLinkOnFeaturedPosts: true, // Show "Read More" on featured cards
showThumbnailOnFeaturedPosts: true, // Display thumbnails on featured posts
// Analytics
gTag: "G-V5QHDKBFP", // Google Analytics tracking ID
}| Option | Type | Default | Description |
|---|---|---|---|
| Basic Site Information | |||
siteTitle |
String | "The Storyteller" | Main site title displayed in header |
siteSubTitle |
String | "Minimal musings..." | Subtitle/tagline shown under title |
copyright |
String | "Β© 2025..." | Copyright text in footer |
| Homepage Display | |||
showAuthorsOnHomePage |
Boolean | false |
Display author information on homepage |
showFeaturrdPostsOnHomePage |
Boolean | true |
Show featured posts section on homepage |
showCategoryOnPosts |
Boolean | true |
Display category labels on posts in homepage |
numberOfLatestPostsPerPage |
Number | 6 |
Number of latest posts displayed on homepage |
numberOfBlogPostsPerPage |
Number | 8 |
Number of posts per paginated blog page |
| UI Labels & Text | |||
labels.featuredPosts |
String | "Featured Posts" | Title for featured posts section |
labels.latestPosts |
String | "Latest Posts" | Title for latest posts section |
labels.viewAllPosts |
String | "View All Posts" | Text for pagination link |
labels.backToHome |
String | "Back to Home" | Back navigation text |
labels.youMightAlsoLike |
String | "You Might Also Like" | Similar posts section title |
labels.postedIn |
String | "Posted in" | Category prefix text in articles |
labels.noArticlesFound |
String | "No articles found." | Empty state message |
labels.allCategories |
String | "All Categories" | Categories page main title |
labels.allTags |
String | "All Tags" | Tags page main title |
labels.allAuthors |
String | "All Authors" | Authors page main title |
labels.exploreArticlesByTags |
String | "Explore articles..." | Tags page description |
labels.exploreArticlesByCategories |
String | "Explore articles..." | Categories page description |
labels.exploreArticlesByAuthors |
String | "Explore articles..." | Authors page description |
| Pagination Settings | |||
pagination.showPrevNext |
Boolean | true |
Show Previous/Next navigation buttons |
pagination.prevText |
String | "Previous" | Text for previous page button |
pagination.nextText |
String | "Next" | Text for next page button |
pagination.postLabel |
String | "posts" | Label used in pagination info display |
| Navigation & Footer | |||
showCategoriesLinkOnFooter |
Boolean | true |
Show Categories link in footer |
showTagsLinkOnFooter |
Boolean | true |
Show Tags link in footer |
showAuthorsLinkOnFooter |
Boolean | true |
Show Authors link in footer |
| Post Display Options | |||
showSimilarPosts |
Boolean | true |
Display similar posts on article pages |
| showReadMoreLinkOnFeaturedPosts | Boolean | true | Show "Read More" link on featured cards |
| showThumbnailOnFeaturedPosts | Boolean | true | Display thumbnail images on featured posts |
| Analytics |
| gTag | String | "G-V5QHDKBFP" | Google Analytics tracking ID (optional) |
Adjust pagination in src/pages/blog/[...page].astro:
return paginate(sortedPosts, {
pageSize: 8, // Posts per page
})To enable Google Analytics tracking on your blog:
-
Get your Google Analytics Tracking ID:
- Go to Google Analytics
- Create a new property for your website
- Copy your Measurement ID (format:
G-XXXXXXXXXX)
-
Update Site Configuration:
Edit
src/site.config.mjsand add your tracking ID:export default { // ... other config options // Analytics gTag: "G-YOUR-TRACKING-ID", // Replace with your actual tracking ID }
-
Verify Installation:
- Build and deploy your site
- Visit your website and check the browser's Network tab
- Look for requests to
gtagorgoogletagmanager.com - Check your Google Analytics dashboard for real-time data
The theme implements Google Analytics with privacy in mind:
- No Personal Data Collection: Only anonymous usage statistics are tracked
- Respects DNT: Honors Do Not Track browser settings
- GDPR Compliant: No cookies are set without user consent
- Minimal Tracking: Only essential page views and navigation are tracked
To disable Google Analytics completely:
export default {
// ... other config options
// Analytics
gTag: "", // Set to empty string or remove the line
}Or comment out the line:
export default {
// ... other config options
// Analytics
// gTag: "G-YOUR-TRACKING-ID" // Commented out
}- Meta Tags: Automatic generation for all pages
- OpenGraph: Social media preview support
- Sitemap: Auto-generated XML sitemap
- RSS Feed: Built-in RSS feed generation
- Connect your GitHub repository
- Build command:
bun buildornpm run buildorpnpm build - Publish directory:
dist
- Import your GitHub repository
- Framework preset: Astro
- Deploy!
After running bun run build, upload the dist/ folder to any static hosting service.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Astro π
- Styled with Tailwind CSS π¨
- Icons from Lucide β¨
- Images from Unsplash πΈ
Made with β€οΈ by Hasin Hayder
β Star this project | π Report Bug | π‘ Request Feature


