add decap cms
Some checks are pending
/ test (push) Waiting to run

This commit is contained in:
gribse 2025-04-24 22:19:51 +02:00
parent 7cce73e2ba
commit e8025733bc
4 changed files with 534 additions and 1 deletions

View file

@ -30,6 +30,8 @@
- [ ] réhéberger TPE & PEM2T (et autres trucs chez OVH) en local - [ ] réhéberger TPE & PEM2T (et autres trucs chez OVH) en local
- [ ] make it so the 404 page works - [ ] make it so the 404 page works
- [ ] Ajouter un colophon - [ ] Ajouter un colophon
- [ ] Modifié last time - [ ] Mis à jour la dernière fois le
- [ ] Installer decap CMS
- [ ] Faire fonctionner l'auth avec forgejo

29
static/admin/config.yml Normal file
View file

@ -0,0 +1,29 @@
backend:
name: gitea
repo: gribse/blog # Path to your Gitea repository
app_id: 39e3a9e2-1bd0-41be-bc4c-7c7f7023b51b # The Client ID provided by Gitea
api_root: https://git.achilletoupin.com/api/v1 # API URL of your Gitea instance
base_url: https://git.achilletoupin.com/ # Root URL of your Gitea instance
auth_endpoint: https://git.achilletoupin.com/login/oauth/authorize
# optional, defaults to master
branch: main
local_backend: true # allows local editing via npx decap-cms-proxy-server
media_folder: "static/images/uploads" # path in repo
public_folder: "/images/uploads" # URL path
collections:
- name: "posts"
label: "Posts"
folder: "content/posts"
create: true
slug: "{{slug}}"
extension: "md" # Hugo expects Markdown
format: "frontmatter"
fields:
- { label: "Title", name: "title", widget: "string" }
- { label: "Date", name: "date", widget: "datetime" }
- { label: "Draft", name: "draft", widget: "boolean", default: true }
- { label: "Tags", name: "tags", widget: "list", default: [] }
- { label: "Body", name: "body", widget: "markdown" }

492
static/admin/decap-cms.js Normal file

File diff suppressed because one or more lines are too long

10
static/admin/index.html Normal file
View file

@ -0,0 +1,10 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>Decap CMS</title>
</head>
<body>
<script src="decap-cms.js"></script>
</body>
</html>