Skip to content

Commit

Permalink
chore(admin): add decap cms 1st draft
Browse files Browse the repository at this point in the history
  • Loading branch information
Fupete authored Nov 29, 2023
2 parents 90e7868 + 500a259 commit b5b7361
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
1 change: 1 addition & 0 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ module.exports = function (eleventyConfig) {
// Copy/pass-through files
eleventyConfig.addPassthroughCopy('src/assets/css')
eleventyConfig.addPassthroughCopy('src/assets/js')
eleventyConfig.addPassthroughCopy('src/admin/config.yml') // decap CMS config

// Build pagefind index
eleventyConfig.on('eleventy.after', async () => {
Expand Down
32 changes: 32 additions & 0 deletions src/admin/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
backend:
# name: git-gateway
branch: main
name: github
repo: fupete/nasonero
media_folder: "src/assets/media"
public_folder: "/media"
publish_mode: editorial_workflow

collections:
- label: "Notes"
name: "notes-en"
folder: "src/en/notes"
create: true
slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
# editor:
# preview: false
fields:
- { label: "Title", name: "title", widget: "string" }
- { label: "Tags", name: "tag", widget: "list" }
- { label: "Body", name: "body", widget: "markdown" }
- label: "Notes"
name: "notes-it"
folder: "src/it/notes"
create: true
slug: "{{year}}-{{month}}-{{day}}-{{slug}}"
# editor:
# preview: false
fields:
- { label: "Title", name: "title", widget: "string" }
- { label: "Tags", name: "tag", widget: "list" }
- { label: "Body", name: "body", widget: "markdown" }
12 changes: 12 additions & 0 deletions src/admin/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!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>

0 comments on commit b5b7361

Please sign in to comment.