Astro
Skill by bezkom
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/bezkom/astroname: astro description: Deploy multilingual static websites for free on Cloudflare using Astro framework with markdown source files. Use when: (1) Creating new static sites or blogs, (2) Setting up multilingual (i18n) content, (3) Deploying to Cloudflare Pages, (4) Converting markdown to static websites, (5) Setting up free hosting infrastructure.
Astro Static Site Generator
Deploy multilingual static websites for free on Cloudflare using Astro framework.
Prerequisites
- Node.js 20+ installed
- Cloudflare account (free)
- Git repository (GitHub, GitLab, or Bitbucket)
Quick Start
1. Create Project
npm create astro@latest my-site -- --template minimal
cd my-site
npm install
2. Configure for Cloudflare
Static Sites (Recommended for most use cases)
No adapter needed. Use default static output:
// astro.config.mjs
import { defineConfig } from 'astro/config';
export default defineConfig({
site: 'https://your-site.pages.dev',
});
SSR/Edge Functions (Optional)
If you need server-side rendering or edge functions:
npm install @astrojs/cloudflare
// astro.config.mjs
import { defineConfig } from 'astro/config';
import cloudflare from '@astrojs/cloudflare';
export default defineConfig({
output: 'server',
adapter: cloudflare(),
site: 'https://your-site.pages.dev',
});
3. Deploy to Cloudflare
Git Integration (Recommended)
- Push to GitHub/GitLab
- Cloudflare Dashboard → Pages → Create project → Connect to Git
- Configure:
- Build command:
npm run build - Build output:
dist
- Build command:
Direct Upload
# Deploy (authenticate via Cloudflare dashboard or wrangler)
npx wrangler pages deploy dist
Multilingual Configuration
Astro Config
// astro.config.mjs
export default defineConfig({
i18n: {
defaultLocale: 'en',
locales: ['en', 'es', 'fr', 'de'],
routing: {
prefixDefaultLocale: false, // /about instead of /en/about
},
},
});
Routing Modes:
| Setting | URL Structure | Best For |
|---|---|---|
prefixDefaultLocale: false | /about, /es/about | Default locale at root |
prefixDefaultLocale: true | /en/about, /es/about | All locales prefixed |
Content Structure
src/content/
├── config.ts # Content collection schema
└── docs/
├── en/
│ ├── index.md
│ └── guide.md
├── es/
│ ├── index.md
│ └── guide.md
└── fr/
├── index.md
└── guide.md
Content Collection Schema
// src/content/config.ts
import { defineCollection, z } from 'astro:content';
const docs = defineCollection({
type: 'content',
schema: z.object({
title: z.string(),
description: z.string(),
lang: z.enum(['en', 'es', 'fr', 'de']),
}),
});
export const collections = { docs };
Note: Run npx astro sync after adding content collections to generate types.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-bezkom-astro": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
Glab
Skill by bezkom
elite-tools
Elite CLI tooling for efficient shell operations with optimized token usage. Use when executing shell commands, traversing directories, or manipulating files to minimize token consumption and prevent regex escaping errors. Covers fdfind, batcat, sd, sg/ast-grep, jc, gron, yq, difft, tealdeer, and html2text.