This commit is contained in:
Generated
+3826
-63
File diff suppressed because it is too large
Load Diff
+4
-2
@@ -10,6 +10,7 @@
|
||||
"astro": "astro"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/check": "^0.9.9",
|
||||
"@astrojs/mdx": "^4.3.13",
|
||||
"@tailwindcss/vite": "^4.2.4",
|
||||
"@tinacms/cli": "^2.1.2",
|
||||
@@ -20,8 +21,9 @@
|
||||
"next": "^14.2.0",
|
||||
"next-auth": "^4.24.7",
|
||||
"tailwindcss": "^4.2.4",
|
||||
"tinacms": "^3.3.2",
|
||||
"tinacms": "^3.7.5",
|
||||
"tinacms-authjs": "^21.0.5",
|
||||
"tinacms-gitprovider-github": "^4.1.5"
|
||||
"tinacms-gitprovider-github": "^4.1.5",
|
||||
"typescript": "^5.6.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import BaseLayout from '../../layouts/BaseLayout.astro';
|
||||
|
||||
export async function getStaticPaths() {
|
||||
const allPosts = await import.meta.glob('../../../content/blog/*.mdx', { eager: true });
|
||||
const allPosts = import.meta.glob<{ Content: any; frontmatter: Record<string, any> }>('../../../content/blog/*.mdx', { eager: true });
|
||||
|
||||
return Object.entries(allPosts).map(([path, post]) => {
|
||||
const slug = path.split('/').pop()?.replace('.mdx', '') || '';
|
||||
@@ -13,7 +13,7 @@ export async function getStaticPaths() {
|
||||
});
|
||||
}
|
||||
|
||||
const { post } = Astro.props;
|
||||
const { post } = Astro.props as { post: { Content: any; frontmatter: Record<string, any> } };
|
||||
const { Content, frontmatter } = post;
|
||||
---
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
import BaseLayout from '../../layouts/BaseLayout.astro';
|
||||
|
||||
const allPostFiles = import.meta.glob('../../../content/blog/*.mdx', { eager: true });
|
||||
const allPostFiles = import.meta.glob<{ frontmatter: Record<string, any> }>('../../../content/blog/*.mdx', { eager: true });
|
||||
const allPosts = Object.entries(allPostFiles).map(([path, post]) => ({
|
||||
...post,
|
||||
slug: path.split('/').pop()?.replace('.mdx', '') || ''
|
||||
|
||||
Reference in New Issue
Block a user