From eacc847c6a418087059899101cc9686f62d2699e Mon Sep 17 00:00:00 2001 From: lzy Date: Thu, 23 Jul 2026 19:16:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8E=A5=E5=85=A5=20Sveltia=20CMS?= =?UTF-8?q?=EF=BC=88/admin=20+=20gitea=20backend=20=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/admin/config.yml | 24 ++++++++++++++++++++++++ public/admin/index.html | 12 ++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 public/admin/config.yml create mode 100644 public/admin/index.html diff --git a/public/admin/config.yml b/public/admin/config.yml new file mode 100644 index 0000000..ca935b3 --- /dev/null +++ b/public/admin/config.yml @@ -0,0 +1,24 @@ +# yaml-language-server: $schema=https://unpkg.com/@sveltia/cms/schema/sveltia-cms.json + +# 本地验证用本地 Gitea(Task 5 起的);生产换真实 Gitea 地址 +backend: + name: gitea + repo: lzy/official-site-base + base_url: http://localhost:3000 + api_root: http://localhost:3000/api/v1 + +media_folder: /public/media +public_folder: /media + +collections: + - name: news + label: 新闻动态 + label_singular: 新闻 + folder: /src/content/news + create: true + slug: '{{slug}}' + fields: + - { label: 标题, name: title, widget: string } + - { label: 日期, name: date, widget: datetime, type: date } + - { label: 分类, name: category, widget: string, default: 未分类 } + - { label: 正文, name: body, widget: richtext } diff --git a/public/admin/index.html b/public/admin/index.html new file mode 100644 index 0000000..82fe17a --- /dev/null +++ b/public/admin/index.html @@ -0,0 +1,12 @@ + + + + + + Sveltia CMS + + + + + +