Install Netlify CMS
This commit is contained in:
parent
85de1413dd
commit
e0a6d03e20
3 changed files with 35 additions and 2 deletions
18
public/admin/config.yml
Normal file
18
public/admin/config.yml
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
backend:
|
||||||
|
name: git-gateway
|
||||||
|
branch: master
|
||||||
|
|
||||||
|
media_folder: 'src/assets/images/posts' # Media files will be stored in the repo under src/assets/images/posts
|
||||||
|
public_folder: '/assets/images/posts' # The src attribute for uploaded media will begin with assets/images/posts
|
||||||
|
|
||||||
|
collections:
|
||||||
|
- name: "blog" # Used in routes, e.g., /admin/collections/blog
|
||||||
|
label: "Blog" # Used in the UI
|
||||||
|
folder: "src/posts" # The path to the folder where the documents are stored
|
||||||
|
create: true # Allow users to create new documents in this collection
|
||||||
|
slug: "{{slug}}" # Filename template, e.g., YYYY-MM-DD-title.md
|
||||||
|
fields: # The fields for each document, usually in front matter
|
||||||
|
- { name: "title", label: "Title" }
|
||||||
|
{ name: "description", label: "Description" }
|
||||||
|
{ name: "date", label: "Date", widget: "datetime" }
|
||||||
|
{ name: "body", label: "Body", widget: "markdown" }
|
||||||
15
public/admin/index.html
Normal file
15
public/admin/index.html
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>Content Manager</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<!-- Include the script that builds the page and powers Netlify CMS -->
|
||||||
|
<script src="https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js"></script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
Loading…
Reference in a new issue