From e0a6d03e209a515fa441e65998b6d75e49f162d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Weng?= Date: Fri, 9 Oct 2020 21:53:04 +0200 Subject: [PATCH] Install Netlify CMS --- netlify.toml | 4 ++-- public/admin/config.yml | 18 ++++++++++++++++++ public/admin/index.html | 15 +++++++++++++++ 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 public/admin/config.yml create mode 100644 public/admin/index.html diff --git a/netlify.toml b/netlify.toml index 1bc23a7..182a663 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,3 +1,3 @@ [build] - publish = "_site" - command = "npm run build" + publish = "_site" + command = "npm run build" diff --git a/public/admin/config.yml b/public/admin/config.yml new file mode 100644 index 0000000..c5eb7fd --- /dev/null +++ b/public/admin/config.yml @@ -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" } diff --git a/public/admin/index.html b/public/admin/index.html new file mode 100644 index 0000000..695479e --- /dev/null +++ b/public/admin/index.html @@ -0,0 +1,15 @@ + + + + + + + Content Manager + + + + + + + +