Fix Astro.glob deprecation warnings
Replace deprecated Astro.glob with import.meta.glob in all pages: - src/pages/index.astro: Updated homepage to use import.meta.glob - src/pages/blog/index.astro: Updated blog listing page - Updated package.json with separate build commands Changes use import.meta.glob with eager loading and properly extract slugs from file paths for routing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Generated
+1
File diff suppressed because one or more lines are too long
Generated
+1
@@ -0,0 +1 @@
|
||||
{"DocumentConnection":{"type":"DocumentConnection","resolveType":"multiCollectionDocumentList","collections":["post","page"]},"Node":{"type":"Node","resolveType":"nodeDocument"},"DocumentNode":{"type":"DocumentNode","resolveType":"multiCollectionDocument","createDocument":"create","updateDocument":"update"},"Post":{"type":"Post","resolveType":"collectionDocument","collection":"post","createPost":"create","updatePost":"update"},"PostConnection":{"type":"PostConnection","resolveType":"collectionDocumentList","collection":"post"},"Page":{"type":"Page","resolveType":"collectionDocument","collection":"page","createPage":"create","updatePage":"update"},"PageConnection":{"type":"PageConnection","resolveType":"collectionDocumentList","collection":"page"}}
|
||||
Generated
+1
@@ -0,0 +1 @@
|
||||
{"version":{"fullVersion":"2.1.0","major":"2","minor":"1","patch":"0"},"meta":{"flags":["experimentalData"]},"collections":[{"name":"post","label":"Blog Posts","path":"content/blog","format":"mdx","fields":[{"type":"string","name":"title","label":"Title","isTitle":true,"required":true,"namespace":["post","title"],"searchable":true,"uid":false},{"type":"datetime","name":"date","label":"Publication Date","required":true,"namespace":["post","date"],"searchable":true,"uid":false},{"type":"string","name":"excerpt","label":"Excerpt","required":true,"description":"Short summary of the blog post","namespace":["post","excerpt"],"searchable":true,"uid":false},{"type":"image","name":"coverImage","label":"Cover Image","description":"Featured image for the blog post","namespace":["post","coverImage"],"searchable":false,"uid":false},{"type":"rich-text","name":"body","label":"Body","isBody":true,"required":true,"namespace":["post","body"],"searchable":true,"parser":{"type":"mdx"},"uid":false}],"namespace":["post"]},{"name":"page","label":"Pages","path":"content/pages","format":"mdx","fields":[{"type":"string","name":"title","label":"Title","isTitle":true,"required":true,"namespace":["page","title"],"searchable":true,"uid":false},{"type":"string","name":"description","label":"Description","description":"Meta description for SEO","namespace":["page","description"],"searchable":true,"uid":false},{"type":"rich-text","name":"body","label":"Content","isBody":true,"required":true,"namespace":["page","body"],"searchable":true,"parser":{"type":"mdx"},"uid":false}],"namespace":["page"]}],"config":{"media":{"tina":{"publicFolder":"public","mediaRoot":"images"}}}}
|
||||
Generated
+2
@@ -0,0 +1,2 @@
|
||||
export default ()=>({})
|
||||
export const client = ()=>({})
|
||||
Generated
+100
@@ -0,0 +1,100 @@
|
||||
// tina/config.ts
|
||||
import { defineConfig } from "tinacms";
|
||||
var config_default = defineConfig({
|
||||
branch: process.env.TINA_BRANCH || "main",
|
||||
clientId: process.env.TINA_CLIENT_ID || "",
|
||||
token: process.env.TINA_TOKEN || "",
|
||||
build: {
|
||||
outputFolder: "admin",
|
||||
publicFolder: "public"
|
||||
},
|
||||
media: {
|
||||
tina: {
|
||||
mediaRoot: "images",
|
||||
publicFolder: "public"
|
||||
}
|
||||
},
|
||||
schema: {
|
||||
collections: [
|
||||
{
|
||||
name: "post",
|
||||
label: "Blog Posts",
|
||||
path: "content/blog",
|
||||
format: "mdx",
|
||||
fields: [
|
||||
{
|
||||
type: "string",
|
||||
name: "title",
|
||||
label: "Title",
|
||||
isTitle: true,
|
||||
required: true
|
||||
},
|
||||
{
|
||||
type: "datetime",
|
||||
name: "date",
|
||||
label: "Publication Date",
|
||||
required: true
|
||||
},
|
||||
{
|
||||
type: "string",
|
||||
name: "excerpt",
|
||||
label: "Excerpt",
|
||||
required: true,
|
||||
description: "Short summary of the blog post"
|
||||
},
|
||||
{
|
||||
type: "image",
|
||||
name: "coverImage",
|
||||
label: "Cover Image",
|
||||
description: "Featured image for the blog post"
|
||||
},
|
||||
{
|
||||
type: "rich-text",
|
||||
name: "body",
|
||||
label: "Body",
|
||||
isBody: true,
|
||||
required: true
|
||||
}
|
||||
],
|
||||
defaultItem: () => {
|
||||
return {
|
||||
title: "New Blog Post",
|
||||
date: (/* @__PURE__ */ new Date()).toISOString(),
|
||||
excerpt: ""
|
||||
};
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "page",
|
||||
label: "Pages",
|
||||
path: "content/pages",
|
||||
format: "mdx",
|
||||
fields: [
|
||||
{
|
||||
type: "string",
|
||||
name: "title",
|
||||
label: "Title",
|
||||
isTitle: true,
|
||||
required: true
|
||||
},
|
||||
{
|
||||
type: "string",
|
||||
name: "description",
|
||||
label: "Description",
|
||||
description: "Meta description for SEO"
|
||||
},
|
||||
{
|
||||
type: "rich-text",
|
||||
name: "body",
|
||||
label: "Content",
|
||||
isBody: true,
|
||||
required: true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
export {
|
||||
config_default as default
|
||||
};
|
||||
Reference in New Issue
Block a user