AGENTS.md
Instructions for AI coding agents working on this VitePress documentation project.
Project Overview
- Type: VitePress documentation site (Vue-based SSG)
- Languages: Indonesian (root) & English
- Deployment: Cloudflare Pages
- Node.js: >= 18
- Module System: ES Modules (
"type": "module")
Build/Dev/Preview Commands
bash
npm install # Install dependencies
npm run docs:dev # Development server (localhost:5173)
npm run docs:build # Build for production (.vitepress/dist/)
npm run docs:preview # Preview production build
# Check broken links (on live site)
npx linkinator https://docs.sugeng.id --recurseTesting & Linting
No test framework or linting configured. This is a documentation-only project.
Critical Rules
1. All URL Paths Must Be English
CORRECT: /id/general/installation
WRONG: /id/panduan-umum/instalasiWhy: VitePress language switcher matches URL paths. Different paths = 404 errors.
2. Files Must Exist in Both Languages
Every file in /id/ must have a matching file in /en/ with the same path:
id/general/installation.md <-> en/general/installation.md
id/wuzz/configuration.md <-> en/wuzz/configuration.md3. Always Update Both Sidebars
When adding pages, update .vitepress/config.mts for BOTH:
locales.root.themeConfig.sidebar(Indonesian, path:/id/)locales.en.themeConfig.sidebar(English, path:/en/)
Project Structure
blogger-docs/
├── .vitepress/
│ ├── config.mts # Main VitePress config (sidebar, nav, SEO)
│ ├── cache/ # Build cache (gitignored)
│ └── dist/ # Build output (gitignored)
├── id/ # Indonesian content
│ ├── index.md # Homepage
│ ├── general/ # General Blogger guides
│ ├── [theme-name]/ # Blogger theme docs
│ └── wordpress/ # WordPress theme docs
├── en/ # English content (mirrors id/)
├── public/ # Static assets (images/, icons/, videos/)
├── index.md # Language selector page
└── wrangler.jsonc # Cloudflare Pages configStandard File Names
| Content Type | File Name |
|---|---|
| Installation | installation.md |
| Settings | configuration.md |
| Customization | customization.md |
| Optimization | optimization.md |
| Navigation Menu | navigation-menu.md |
| Social Icons | social-icons.md |
| Blog Elements | blog-elements.md |
| Image Upload | image-upload.md |
Code Style Guidelines
TypeScript (config.mts)
- Import types:
import { defineConfig, HeadConfig } from 'vitepress' - Use
constfor module-level constants - Use template literals for URL construction
Markdown Files
- Add frontmatter at top of each file:yaml
--- title: Page Title description: Brief SEO description --- - Use callouts:
::: info,::: tip,::: warning,::: danger - Reference images:
/images/filename.png(nopublic/prefix) - Use tables for settings/options overview
- Keep headings hierarchical (h1 > h2 > h3)
Images
- Store in
public/images/ - Use descriptive names:
wuzz-theme-settings.png - Reference as
/images/filename.png
Adding New Content
New Page
- Create
/id/[path]/[name].mdwith Indonesian content - Create
/en/[path]/[name].mdwith English content - Update sidebar in
config.mtsfor BOTH languages
New Blogger Theme
- Create
/id/[theme-name]/configuration.md - Create
/en/[theme-name]/configuration.md - Add to sidebar under "Tema Blogger" (ID) / "Blogger Themes" (EN)
New WordPress Theme
- Create
/id/wordpress/[theme-name]/configuration.md - Create
/en/wordpress/[theme-name]/configuration.md - Add to sidebar under "Tema WordPress" (ID) / "WordPress Themes" (EN)
Key Files
| File | Purpose |
|---|---|
.vitepress/config.mts | VitePress config, sidebar, navbar, SEO |
id/index.md | Indonesian homepage |
en/index.md | English homepage |
wrangler.jsonc | Cloudflare Pages deployment |
Config.mts Structure
head: Meta tags, favicons, Open Graph, Twitter CardtransformHead(): Canonical URLs, hreflang tags (auto-generated)locales.root: Indonesian config (sidebar, nav, UI text)locales.en: English config (sidebar, nav)themeConfig: Global settings (logo, search, footer)
Do NOT
- Use Indonesian words in file/folder names
- Create pages in only one language
- Forget to update sidebar after adding pages
- Push to remote without explicit user confirmation
- Modify
.vitepress/cache/or.vitepress/dist/manually
Deployment & SEO
- Host: Cloudflare Pages (automatic deployment)
- Build output:
.vitepress/dist - Canonical URLs: Auto-generated via
transformHead() - Hreflang tags: Auto-generated for id/en alternates
- Sitemap: Generated at build time
External Links
- Main site:
https://sugeng.id - Live docs:
https://docs.sugeng.id - Tools:
https://sugeng.id/tools/[tool-name].html