Add EmDash CMS blog + hero standardization + seed fix

- Add EmDash CMS integration with SQLite and local storage
- Add blog collection (seed/seed.json) with 3 sample posts
- Add /บทความ list page and /บทความ/[slug] detail page
- Add blog section to homepage
- Fix reserved field slugs (slug, published_at removed from fields)
- Fix date field mapping (publishedAt camelCase)
- Fix featured image URL for admin-uploaded images (meta.storageKey)
- Standardize all product page hero sections
- Update navigation with 'บทความ' link
- Configure Google OAuth provider
This commit is contained in:
Kunthawat Greethong
2026-06-01 15:44:02 +07:00
parent 825d3264b3
commit c8cf03a725
35 changed files with 5786 additions and 185 deletions

View File

@@ -1,5 +1,10 @@
import { defineConfig } from 'astro/config'
import tailwindcss from '@tailwindcss/vite'
import node from '@astrojs/node'
import react from '@astrojs/react'
import emdash, { local } from 'emdash/astro'
import { sqlite } from 'emdash/db'
import { google } from 'emdash/auth/providers/google'
import { fileURLToPath } from 'url'
import path from 'path'
@@ -7,6 +12,10 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url))
export default defineConfig({
site: 'https://dealplustech.com',
output: 'server',
adapter: node({
mode: 'standalone',
}),
vite: {
plugins: [tailwindcss()],
resolve: {
@@ -18,7 +27,17 @@ export default defineConfig({
},
},
},
output: 'static',
integrations: [
react(),
emdash({
database: sqlite({ url: 'file:./data.db' }),
storage: local({
directory: './uploads',
baseUrl: '/_emdash/api/media/file',
}),
authProviders: [google()],
}),
],
build: {
assets: '_assets',
},
@@ -26,4 +45,5 @@ export default defineConfig({
host: '0.0.0.0',
port: 3100,
},
devToolbar: { enabled: false },
})