feat: add decap cms
This commit is contained in:
parent
5fdd391545
commit
a549820459
23
public/admin/config.yml
Normal file
23
public/admin/config.yml
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
backend:
|
||||||
|
name: gitea
|
||||||
|
repo: log101/log101-dot-dev # Path to your Gitea repository
|
||||||
|
app_id: c7f89c71-293e-4ea1-8566-109d508d8116 # The Client ID provided by Gitea
|
||||||
|
api_root: https://git.acayip.dev/api/v1 # API URL of your Gitea instance
|
||||||
|
base_url: https://git.acayip.dev # Root URL of your Gitea instance
|
||||||
|
auth_endpoint: https://git.acayip.dev/login/oauth/authorize
|
||||||
|
branch: main
|
||||||
|
collections:
|
||||||
|
- name: "blog" # Used in routes, e.g., /admin/collections/blog
|
||||||
|
label: "Blog" # Used in the UI
|
||||||
|
folder: "src/content/blog" # 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, e.g., YYYY-MM-DD-title.md
|
||||||
|
fields: # The fields for each document, usually in front matter
|
||||||
|
- { label: "Yayına hazır mı?", name: "draft", widget: "boolean" }
|
||||||
|
- { label: "Başlık", name: "title", widget: "string" }
|
||||||
|
- { label: "Tarih", name: "date", widget: "datetime" }
|
||||||
|
- { label: "Özet", name: "summary", widget: "string" }
|
||||||
|
- { label: "Kategori", name: "category", widget: "string" }
|
||||||
|
- { label: "Alt Kategori", name: "subcategory", widget: "string" }
|
||||||
|
media_folder: "src/assets/images"
|
||||||
|
public_folder: "src/assets/images"
|
14
src/pages/admin.html
Normal file
14
src/pages/admin.html
Normal 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" />
|
||||||
|
<link href="/admin/config.yml" type="text/yaml" rel="cms-config-url" />
|
||||||
|
<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>
|
Loading…
Reference in New Issue
Block a user