Add deployment and content documentation
This commit is contained in:
157
CONTENT-GUIDE.md
Normal file
157
CONTENT-GUIDE.md
Normal file
@@ -0,0 +1,157 @@
|
||||
# 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
|
||||
|
||||
1. Create a new `.md` file in `src/content/blog/`
|
||||
2. Use the frontmatter template below:
|
||||
|
||||
```markdown
|
||||
---
|
||||
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 section
|
||||
- `about.jpg` - About section
|
||||
- `feature-1.jpg`, `feature-2.jpg`, etc.
|
||||
|
||||
### Homepage Images
|
||||
- Location: `public/images/`
|
||||
- `hero-home.jpg` - Main hero
|
||||
- `about-home.jpg` - About section
|
||||
- `contact-home.jpg` - Contact section
|
||||
|
||||
## Page Structure
|
||||
|
||||
### Static Pages
|
||||
- `src/pages/index.astro` - Homepage
|
||||
- `src/pages/about-us.astro` - About page
|
||||
- `src/pages/contact-us.astro` - Contact page
|
||||
- `src/pages/faq.astro` - FAQ page
|
||||
- `src/pages/portfolio.astro` - Portfolio page
|
||||
|
||||
### Service Pages
|
||||
- `src/pages/web-development.astro`
|
||||
- `src/pages/marketing-automation.astro`
|
||||
- `src/pages/ai-automation.astro`
|
||||
- `src/pages/tech-consult.astro`
|
||||
|
||||
### Blog
|
||||
- `src/pages/blog/index.astro` - Blog listing
|
||||
- `src/pages/blog/[slug].astro` - Individual post (dynamic)
|
||||
|
||||
### Legal
|
||||
- `src/pages/privacy-policy.astro`
|
||||
- `src/pages/terms-and-conditions.astro`
|
||||
|
||||
### Admin
|
||||
- `src/pages/admin/consent-logs.astro` - Cookie consent logs
|
||||
|
||||
## Content Collections (Astro DB)
|
||||
|
||||
### Blog Collection
|
||||
```typescript
|
||||
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
|
||||
|
||||
1. Create `.astro` file in `src/pages/`
|
||||
2. Import and use Layout:
|
||||
```astro
|
||||
---
|
||||
import Layout from '../layouts/Layout.astro';
|
||||
---
|
||||
<Layout title="Page Title" description="SEO description">
|
||||
<main>
|
||||
<!-- Your content -->
|
||||
</main>
|
||||
</Layout>
|
||||
```
|
||||
|
||||
## SEO Best Practices
|
||||
|
||||
1. **Title**: Keep under 60 characters
|
||||
2. **Description**: Keep under 160 characters
|
||||
3. **Images**: Always include alt text
|
||||
4. **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
|
||||
|
||||
```bash
|
||||
# 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
|
||||
Reference in New Issue
Block a user