3.4 KiB
3.4 KiB
Content Guide - MoreminiMore Website
Overview
This website uses Astro 6 with Content Collections for managing blog posts and pages.
Content Structure
src/content/
├── blog/
│ ├── post-1.md
│ ├── post-2.md
│ └── ...
└── config.ts # Content collection definitions
Adding New Blog Posts
- Create a new
.mdfile insrc/content/blog/ - Use the frontmatter template below:
---
title: "Your Post Title"
description: "SEO description for this post"
pubDate: 2026-04-22
image: "/images/blog/your-image.jpg"
tags: ["tag1", "tag2"]
---
Your content here...
Frontmatter Fields
| Field | Type | Required | Description |
|---|---|---|---|
title |
string | Yes | Post title |
description |
string | Yes | SEO meta description |
pubDate |
Date | Yes | Publication date |
image |
string | Yes | Hero image path (16:9 recommended) |
tags |
string[] | No | Tags for categorization |
Images
Blog Post Images
- Location:
public/images/blog/ - Aspect ratio: 16:9
- Recommended size: 1200x675px or larger
- Formats: JPG, PNG, WebP
Service Page Images
- Location:
public/images/services/ - Each service has dedicated images:
hero.jpg- Hero sectionabout.jpg- About sectionfeature-1.jpg,feature-2.jpg, etc.
Homepage Images
- Location:
public/images/ hero-home.jpg- Main heroabout-home.jpg- About sectioncontact-home.jpg- Contact section
Page Structure
Static Pages
src/pages/index.astro- Homepagesrc/pages/about-us.astro- About pagesrc/pages/contact-us.astro- Contact pagesrc/pages/faq.astro- FAQ pagesrc/pages/portfolio.astro- Portfolio page
Service Pages
src/pages/web-development.astrosrc/pages/marketing-automation.astrosrc/pages/ai-automation.astrosrc/pages/tech-consult.astro
Blog
src/pages/blog/index.astro- Blog listingsrc/pages/blog/[slug].astro- Individual post (dynamic)
Legal
src/pages/privacy-policy.astrosrc/pages/terms-and-conditions.astro
Admin
src/pages/admin/consent-logs.astro- Cookie consent logs
Content Collections (Astro DB)
Blog Collection
const blogCollection = defineCollection({
type: 'content',
schema: z.object({
title: z.string(),
description: z.string(),
pubDate: z.date(),
image: z.string(),
tags: z.array(z.string()).optional(),
}),
});
Adding New Pages
- Create
.astrofile insrc/pages/ - Import and use Layout:
---
import Layout from '../layouts/Layout.astro';
---
<Layout title="Page Title" description="SEO description">
<main>
<!-- Your content -->
</main>
</Layout>
SEO Best Practices
- Title: Keep under 60 characters
- Description: Keep under 160 characters
- Images: Always include alt text
- Headings: Use proper heading hierarchy (h1 → h2 → h3)
Thai Content
All content is in Thai language. When adding new content:
- Use Thai characters
- Follow Thai writing conventions
- Include Thai punctuation
Testing Content
# Run development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview
Content Review Checklist
Before publishing:
- Proofread Thai content
- Check all images load correctly
- Verify links work
- Test on mobile view
- Check page titles and descriptions