EmDash CMS integration is being removed. The blog content is
moved to native Astro content collections (markdown files in
src/content/blog/) which works with the static output config.
Changes:
- Remove EmDash from astro.config.mjs (revert to static output)
- Remove emdash packages from package.json/package-lock.json
- Remove seed/seed.json (was EmDash-only)
- Remove src/live.config.ts (EmDash Astro loader)
- Add src/content.config.ts (Astro content collection for blog)
- Move 3 blog posts to src/content/blog/*.md
- Update src/pages/index.astro to use getCollection('blog')
- Update src/pages/บทความ/[slug].astro to use render() from astro:content
(Astro 6 API: render(article), not article.render())
- Update src/pages/บทความ/index.astro (blog list)
- Add .hermes/ to .gitignore
Verified:
- npm run build: 35 pages, complete in 2.50s
- / , /aeroflex, /about-us, /บทความ, /บทความ/welcome-post: all 200
35 lines
828 B
JavaScript
35 lines
828 B
JavaScript
import { defineConfig } from 'astro/config'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
import react from '@astrojs/react'
|
|
import { fileURLToPath } from 'url'
|
|
import path from 'path'
|
|
|
|
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
|
|
export default defineConfig({
|
|
site: 'https://dealplustech.com',
|
|
output: 'static',
|
|
vite: {
|
|
plugins: [tailwindcss()],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
'@components': path.resolve(__dirname, './src/components'),
|
|
'@layouts': path.resolve(__dirname, './src/layouts'),
|
|
'@styles': path.resolve(__dirname, './src/styles'),
|
|
},
|
|
},
|
|
},
|
|
integrations: [
|
|
react(),
|
|
],
|
|
build: {
|
|
assets: '_assets',
|
|
},
|
|
server: {
|
|
host: '0.0.0.0',
|
|
port: 3100,
|
|
},
|
|
devToolbar: { enabled: false },
|
|
})
|