added basic cms
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 40s

This commit is contained in:
2025-06-01 22:16:39 +02:00
parent b2eb5856c0
commit 2b8b7fa37f
2 changed files with 39 additions and 0 deletions

26
static/admin/config.yml Normal file
View File

@@ -0,0 +1,26 @@
backend:
name: gitea
repo: owner-name/repo-name # Path to your Gitea repository
app_id: 10f0fe83-402c-4beb-b732-386fc394b4b5 # The Client ID provided by Gitea
api_root: https://gitea.benno-lorenz.com/api/v1 # API URL of your Gitea instance
base_url: https://gitea.benno-lorenz.com # Root URL of your Gitea instance
auth_endpoint: https://gitea.benno-lorenz.com/login/oauth/authorize
media_folder: "static/images/uploads" # Media files will be stored here
public_folder: "/images/uploads" # The src attribute for uploaded media
collections:
- name: "posts" # Used in routes, e.g., /admin/collections/blog
label: "Blog Posts" # Used in the UI
folder: "content/posts" # The path to the folder where the documents are stored
create: true # Allow users to create new documents in this collection
slug: "{{year}}-{{month}}-{{day}}-{{slug}}" # Filename template
fields: # The fields for each document
- {label: "Title", name: "title", widget: "string"}
- {label: "Publish Date", name: "date", widget: "datetime"}
- {label: "Featured Image", name: "image", widget: "image", required: false}
- {label: "Description", name: "description", widget: "text"}
- {label: "Categories", name: "categories", widget: "list", required: false}
- {label: "Tags", name: "tags", widget: "list", required: false}
- {label: "Draft", name: "draft", widget: "boolean", default: false}
- {label: "Body", name: "body", widget: "markdown"}

13
static/admin/index.html Normal file
View File

@@ -0,0 +1,13 @@
<!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>
<!-- Include the script that builds the page and powers Decap CMS -->
<script src="https://unpkg.com/decap-cms@^3.0.0/dist/decap-cms.js"></script>
</body>
</html>