Polyglow is a static Astro blog theme for multilingual writing.
It includes locale routes, content collections, categories, tags, author pages, search, RSS, sitemap, SEO metadata, optimized images, light/dark themes, and static deployment output.
Requirements:
- Node.js 24 or newer
- pnpm 11
pnpm install
pnpm devAstro prints the local URL, usually:
http://localhost:4321/en/
pnpm dev # Start local development
pnpm build # Build the static site
pnpm preview # Preview the built site locally
pnpm deploy # Build and deploy to Cloudflare with WranglerContent lives in src/content:
src/content/
authors/
pages/
posts/
Posts use locale folders:
src/content/posts/en/my-post.mdx
src/content/posts/zh/my-post.mdx
Post frontmatter:
---
title: "Post title"
description: "Short summary for cards and metadata."
category: "build"
tags: ["strategy"]
pubDate: 2026-05-12
updatedDate: 2026-05-12
authors: ["default"]
heroImage: "/open-graph.webp"
heroImageAlt: "Descriptive image alternative text"
locale: "en"
slug: "my-post"
draft: false
featured: false
---Remote heroImage values must include heroImageWidth and heroImageHeight.
Common files:
AGENTS.md # Coding agent instructions
DESIGN.md # Design tokens and visual identity notes
src/config/site.ts # Site name, URL, repository, homepage layout
src/config/locales.ts # Locales and text direction
src/config/taxonomy.ts # Categories and tags
src/i18n/*.json # Interface text
Design token workflow:
pnpm design:lint # Validate DESIGN.md
pnpm design:theme # Generate Tailwind v4 @theme CSSThe generated Tailwind v4 theme is written to
src/styles/design-theme.css. The live runtime theme in
src/styles/global.css still uses CSS variable indirection for dark mode.
Configured locales:
zh en fr es ru ja ko pt de id ar
Homepage layouts in src/config/site.ts:
cover: image-led homepage.archive: compact archive-first homepage.text: text-card homepage for low-image publishing.
The build output is dist.
pnpm buildPolyglow can be published to any static host, including Cloudflare Pages, Vercel, Netlify, GitHub Pages, or a plain web server. It does not require a database or serverless function.
Polyglow also includes an optional Cloudflare Workers deployment path:
pnpm deployGoogle Tag Manager support is optional and disabled by default. When enabled, the GTM script is loaded through Partytown so analytics work is moved off the main thread.
Configure it with public environment variables:
PUBLIC_GTM_ENABLED=true
PUBLIC_GTM_ID=GTM-XXXXXXXGoogle AdSense support is optional and disabled by default. When enabled, the site loads the official async AdSense script from the shared layout.
Configure it with public environment variables:
PUBLIC_ADSENSE_ENABLED=true
PUBLIC_ADSENSE_CLIENT_ID=ca-pub-0000000000000000x402 metadata support is optional and disabled by default. The widget publishes machine-readable payment metadata when imported into a page or layout, while keeping Polyglow a static site. It is not mounted in the shared layout by default. It does not enforce HTTP 402 payment by itself; payment enforcement requires a separate server middleware integration such as x402 middleware.
Configure it with public environment variables:
PUBLIC_X402_ENABLED=true
PUBLIC_X402_PAY_TO=0xYourWalletAddress
PUBLIC_X402_NETWORK=eip155:8453
PUBLIC_X402_PRICE=$0.01
PUBLIC_X402_DESCRIPTION=Voluntary x402 payment support for Polyglow content.
PUBLIC_X402_FACILITATOR_URL=https://x402.org/facilitatorUse src/components/widgets/X402.astro only on pages or layouts where x402
metadata should be published.
Questions, ideas, and bug reports go to GitHub Issues.
MIT. See LICENSE.