- 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
50 lines
1.2 KiB
JavaScript
50 lines
1.2 KiB
JavaScript
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'
|
|
|
|
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: {
|
|
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(),
|
|
emdash({
|
|
database: sqlite({ url: 'file:./data.db' }),
|
|
storage: local({
|
|
directory: './uploads',
|
|
baseUrl: '/_emdash/api/media/file',
|
|
}),
|
|
authProviders: [google()],
|
|
}),
|
|
],
|
|
build: {
|
|
assets: '_assets',
|
|
},
|
|
server: {
|
|
host: '0.0.0.0',
|
|
port: 3100,
|
|
},
|
|
devToolbar: { enabled: false },
|
|
})
|