first commit with decap cms and git integration

This commit is contained in:
2024-05-24 12:07:00 +00:00
commit 241513ed8e
14 changed files with 417 additions and 0 deletions

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

@ -0,0 +1,24 @@
backend:
name: gitea
repo: tanshu/hugo-labels
app_id: 29063fe9-23eb-469d-9c93-76f208c9f563 # The Client ID provided by Gitea
api_root: https://git.tanshu.com/api/v1 # API URL of your Gitea instance
base_url: https://git.tanshu.com # Root URL of your Gitea instance
auth_endpoint: https://git.tanshu.com/login/oauth/authorize
branch: main # Branch to update
media_folder: "static/images/uploads" # Media files will be stored in the repo under static/images/uploads
public_folder: "/images/uploads" # The src attribute for uploaded media will begin with /images/uploads
collections:
- name: "labels"
label: "Labels"
folder: "content/labels"
create: true
slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
fields:
- { label: "Name", name: "name", widget: "string" }
- { label: "Weight", name: "weight", widget: "string" }
- { label: "Date", name: "date", widget: "datetime" }
- { label: "Description", name: "description", widget: "markdown" }
- { label: "Nutrition", name: "nutrition", widget: "markdown" }

14
static/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>
<!-- 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>

View File