From 2b8b7fa37fb245283de2305613620d8f29f848c8 Mon Sep 17 00:00:00 2001 From: Benno Lorenz Date: Sun, 1 Jun 2025 22:16:39 +0200 Subject: [PATCH] added basic cms --- static/admin/config.yml | 26 ++++++++++++++++++++++++++ static/admin/index.html | 13 +++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 static/admin/config.yml create mode 100644 static/admin/index.html diff --git a/static/admin/config.yml b/static/admin/config.yml new file mode 100644 index 0000000..9bdaa27 --- /dev/null +++ b/static/admin/config.yml @@ -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"} + diff --git a/static/admin/index.html b/static/admin/index.html new file mode 100644 index 0000000..69eff8e --- /dev/null +++ b/static/admin/index.html @@ -0,0 +1,13 @@ + + + + + + + Content Manager + + + + + + \ No newline at end of file