This commit is contained in:
mmm8955405 2025-04-27 19:05:18 +08:00
parent c3544fbff9
commit 178465261f
6 changed files with 3339 additions and 5 deletions

View File

@ -3,8 +3,14 @@ import { defineConfig } from 'astro/config';
import mdx from '@astrojs/mdx';
import sitemap from '@astrojs/sitemap';
import tailwindcss from '@tailwindcss/vite';
// https://astro.build/config
export default defineConfig({
site: 'https://example.com',
integrations: [mdx(), sitemap()],
site: 'https://example.com',
integrations: [mdx(), sitemap()],
vite: {
plugins: [tailwindcss()],
},
});

View File

@ -12,6 +12,8 @@
"@astrojs/mdx": "^4.2.5",
"@astrojs/rss": "^4.0.11",
"@astrojs/sitemap": "^3.3.1",
"astro": "^5.7.5"
"@tailwindcss/vite": "^4.1.4",
"astro": "^5.7.5",
"tailwindcss": "^4.1.4"
}
}

19
public/admin/config.yml Normal file
View File

@ -0,0 +1,19 @@
local_backend: true
backend:
name: git-gateway
media_folder: "public/uploads"
collections:
- name: "blog"
label: "Blog"
folder: "src/content/blog"
create: true
fields:
- { label: "Layout", name: "layout", widget: "hidden", default: "blog" }
- { label: "Title", name: "title", widget: "string" }
- { label: "Publish Date", name: "date", widget: "datetime" }
- { label: "Featured Image", name: "thumbnail", widget: "image" }
- { label: "Rating (scale of 1-5)", name: "rating", widget: "number" }
- { label: "Body", name: "body", widget: "markdown" }

14
public/admin/index.html Normal file
View File

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="robots" content="noindex" />
<title>Content Manager</title>
</head>
<body>
<script src="https://unpkg.com/decap-cms@3.6.2/dist/decap-cms.js"></script>
<!-- <script src="https://unpkg.com/@sveltia/cms/dist/sveltia-cms.js"></script>-->
</body>
</html>

View File

@ -52,6 +52,7 @@ const { title, description, pubDate, updatedDate, heroImage } = Astro.props;
font-style: italic;
}
</style>
<script src="https://unpkg.com/@sveltia/cms/dist/sveltia-cms.js"></script>
</head>
<body>

3292
yarn.lock

File diff suppressed because it is too large Load Diff