Skip to content

Commit

Permalink
Add astro DB
Browse files Browse the repository at this point in the history
  • Loading branch information
spcbfr committed Mar 25, 2024
1 parent 12fa82a commit e26ede9
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 4 deletions.
9 changes: 5 additions & 4 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ import sitemap from "@astrojs/sitemap";
import tailwind from "@astrojs/tailwind";
import { transformerMetaWordHighlight, transformerMetaHighlight } from '@shikijs/transformers';
import vercel from "@astrojs/vercel/serverless";

import svelte from "@astrojs/svelte";

import db from "@astrojs/db";

// https://astro.build/config
export default defineConfig({
site: "https://yusuf.fyi",
integrations: [mdx(), sitemap(), tailwind(), svelte()],
integrations: [mdx(), sitemap(), tailwind(), svelte(), db()],
experimental: {
contentCollectionCache: true,
contentCollectionCache: true
},
markdown: {
shikiConfig: {
Expand Down Expand Up @@ -49,4 +50,4 @@ export default defineConfig({
enabled: true
}
})
});
});
Binary file modified bun.lockb
Binary file not shown.
6 changes: 6 additions & 0 deletions db/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { defineDb } from 'astro:db';

// https://astro.build/db/config
export default defineDb({
tables: {}
});
6 changes: 6 additions & 0 deletions db/seed.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { db } from 'astro:db';

// https://astro.build/db/seed
export default async function seed() {
// TODO
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
},
"dependencies": {
"@astrojs/check": "^0.5.9",
"@astrojs/db": "^0.9.4",
"@astrojs/markdoc": "^0.9.2",
"@astrojs/mdx": "^2.2.0",
"@astrojs/rss": "^4.0.5",
Expand Down
1 change: 1 addition & 0 deletions src/env.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/// <reference path="../.astro/db-types.d.ts" />
/// <reference path="../.astro/types.d.ts" />
/// <reference types="astro/client" />

0 comments on commit e26ede9

Please sign in to comment.