Guide: Building a Directory Website from the Template
How an AI agent (or developer) builds a complete directory website using this template.
Overview
The minimal template provides:
- A working Astro app with all routes
- Headless (unstyled) components
- Data loading from a Git repo
- Plugin system for features
Your job: apply styling, customize layouts, and configure plugins to create a unique directory website.
Step-by-Step Process
Step 1: Understand the Data
Read the content repository to understand what you're working with:
- Check
.content/.works/works.ymlfor site name, item naming, etc. - Check
.content/categories.ymlfor available categories - Check
.content/tags.ymlfor available tags - Browse
.content/data/to understand item structure - Note: the data format is documented in
docs/specs/data-schema.md
Step 2: Plan the Design
Based on the data:
- Choose a visual style (clean/minimal, bold/modern, playful, corporate)
- Plan the home page layout (hero, featured items, category grid)
- Plan the item card design (what info to show)
- Plan the item detail page layout
- Plan the color scheme
Step 3: Configure Plugins
Edit apps/web/src/lib/plugins.config.ts:
import { definePlugins } from '@ever-works/plugins';
import { searchPlugin } from '@ever-works/plugin-search';
import { filtersPlugin } from '@ever-works/plugin-filters';
import { paginationPlugin } from '@ever-works/plugin-pagination';
import { seoPlugin } from '@ever-works/plugin-seo';
export default definePlugins([
searchPlugin(),
filtersPlugin({ enableCategoryFilter: true, enableTagFilter: true }),
paginationPlugin({ itemsPerPage: 20 }),
seoPlugin({ generateJsonLd: true }),
]);
Step 4: Apply Global Styling
Create or edit apps/web/src/styles/global.css:
@import 'tailwindcss';
/* Custom theme colors */
:root {
--color-primary: #3b82f6;
--color-secondary: #8b5cf6;
--color-accent: #f59e0b;
}
/* Dark mode */
.dark {
--color-primary: #60a5fa;
--color-secondary: #a78bfa;
--color-accent: #fbbf24;
}
Step 5: Customize Components
Override component styling using class props and Tailwind:
---
import ItemCard from '@ever-works/ui/astro/ItemCard.astro';
import ItemGrid from '@ever-works/ui/astro/ItemGrid.astro';
import Hero from '@ever-works/ui/astro/Hero.astro';
---
<Hero
title="Discover Amazing Tools"
subtitle="The best directory of developer tools"
class="bg-gradient-to-r from-blue-600 to-purple-600 text-white py-20"
/>
<ItemGrid
items={items}
columns={3}
class="gap-6 px-4 max-w-7xl mx-auto"
/>
Step 6: Customize Pages
Edit Astro pages in apps/web/src/pages/:
index.astro— Home page layoutitems/index.astro— Listing page styleitems/[slug].astro— Detail page layout
Step 7: Build and Deploy
# Build locally
pnpm build
# Deploy to Vercel
# (Automatically via GitHub Actions or manual)
Step 8: Verify
- Check all pages render correctly
- Verify search works
- Verify filters work
- Check responsive design (mobile, tablet, desktop)
- Run Lighthouse audit
- Verify all links work
Tips for AI Agents
- Read before writing — Always check existing code before making changes
- Use data attributes — Style via
[data-component="item-card"]selectors - Test incrementally — Build and check after each major change
- Keep it simple — The template is minimal for a reason
- Follow conventions — Check
AGENTS.mdrules before every change