A multilingual Astro 6 blog theme for content-first publishing
A polished, responsive Astro theme built for multilingual blogs, editorial sites, and personal publishing. It ships with locale-aware routes, centralized translations, SEO-ready defaults, optimized images, and a clean reading experience out of the box.
- Highlights
- Quick Start
- Project Structure
- Internationalization
- Content Authoring
- Configuration
- Contributing
- License
- Multilingual by design: language-prefixed routes, centralized dictionaries, and fallback-friendly localization.
- Content collections: typed frontmatter for posts, pages, and authors.
- SEO ready: canonical URLs, Open Graph tags, JSON-LD, sitemap, and RSS feeds.
- Fast by default: optimized images, prefetching, minimal client-side JavaScript, and Pagefind search.
- Modern stack: Astro 6, Tailwind CSS 4, MDX, Partytown, and Cloudflare-ready static output.
- Editorial layout: built for long-form reading, featured media, and clear content hierarchy.
- Live site: https://astrology.idimi.com
- Preview image:
public/screenshot.webp
- Node.js 20 or newer
- pnpm
git clone https://github.com/idimilabs/Astrology-i18n.git
cd Astrology-i18n
pnpm installpnpm run devOpen http://localhost:4321 in your browser.
pnpm run build
pnpm run previewpnpm run build outputs the static site to dist/.
The project is configured for static deployment with Wrangler:
pnpm run deploy.
├── public/ # Static assets
├── src/
│ ├── assets/ # Optimized images and media
│ ├── components/ # Reusable UI pieces
│ ├── content/ # Posts, pages, and authors
│ ├── i18n/ # Translation dictionaries
│ ├── layouts/ # Page layouts
│ ├── pages/ # Route definitions
│ ├── styles/ # Global styles
│ ├── utils/ # Helpers and shared logic
│ └── content.config.ts # Content collections schema
├── astro.config.mjs # Astro configuration
└── package.json # Scripts and dependencies
The theme supports 10 locales:
zh, en, fr, es, ru, ja, ko, pt, de, id
en is the default locale.
- Add the locale code to
src/utils/i18n.ts. - Update
src/content.config.tsif the content schema needs to recognize the locale. - Create a matching dictionary in
src/i18n/<lang>.json. - Adjust
astro.config.mjsif you need sitemap or routing changes.
Locale-aware pages live under src/pages/[lang]/. If a localized page is missing, you can fall back to the default language while keeping the locale URL structure intact.
Posts live in src/content/posts/[lang]/. Pages and author profiles follow the same collection-driven pattern.
Example frontmatter:
---
title: "The Art of Star Gazing"
description: "A guide to observing the night sky."
pubDate: 2024-03-21
category: "Astronomy"
tags: ["Stars", "Night"]
author: "Astro Learner"
heroImage: "../assets/stars.jpg"
locales: "en"
---Recommended practices:
- Keep titles concise and descriptive.
- Use
descriptionfor search and social previews. - Add
heroImagefor posts that benefit from a strong visual lead. - Use
localesto filter or scope content by language when needed.
The author page can show a contribution calendar.
GITHUB_TOKEN=your_personal_access_token- Set
GITHUB_TOKENlocally for development. - Add it to your deployment environment if you want live GitHub activity data in production.
- Without the token, the site falls back gracefully.
The project includes Partytown support for performance-friendly analytics. Configure your GTM or analytics IDs in src/components/analytics.
Search is powered by Pagefind and is generated automatically during pnpm run build.
Prettier is configured for the codebase.
pnpm run formatContributions are welcome.
- Fork the repository.
- Create a branch for your change.
- Commit with a clear Conventional Commit message.
- Open a pull request.
MIT. See LICENSE for details.
Built with care by iDiMi