mirror of
https://github.com/withastro/astro.git
synced 2025-01-06 22:10:10 -05:00
37 lines
498 B
TypeScript
37 lines
498 B
TypeScript
import { defineConfig } from 'astro/config';
|
|
import db, { defineCollection, field } from '@astrojs/db';
|
|
|
|
const Author = defineCollection({
|
|
fields: {
|
|
name: field.text(),
|
|
},
|
|
source: 'local',
|
|
data() {
|
|
return [
|
|
{
|
|
name: 'Ben',
|
|
},
|
|
{
|
|
name: 'Nate',
|
|
},
|
|
{
|
|
name: 'Erika',
|
|
},
|
|
{
|
|
name: 'Bjorn',
|
|
},
|
|
{
|
|
name: 'Sarah',
|
|
},
|
|
]
|
|
}
|
|
})
|
|
|
|
// https://astro.build/config
|
|
export default defineConfig({
|
|
integrations: [db()],
|
|
db: {
|
|
collections: { Author },
|
|
}
|
|
});
|
|
|