From 9c39192352531516e6d0e8c489ba64cdf0f07dfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Weng?= Date: Sat, 10 Oct 2020 01:00:28 +0200 Subject: [PATCH] Add stack=cms params in README file, enable editorial workflow and make netlify identity widget only available in homepage --- README.md | 2 +- public/admin/config.yml | 18 ++++++++++++++++++ public/admin/index.html | 3 --- src/_includes/layouts/base.ejs | 3 ++- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 99d2a32..ba2757b 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,7 @@ Now, your blog is ready to be deployed. All generated files are located at `_sit Clone this repository on own GitHub account and deploy to Netlify: -[![Netlify Deploy button](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/ixartz/Eleventy-Starter-Boilerplate) +[![Netlify Deploy button](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/ixartz/Eleventy-Starter-Boilerplate&stack=cms) ### Contributions diff --git a/public/admin/config.yml b/public/admin/config.yml index 6763060..bed4b32 100644 --- a/public/admin/config.yml +++ b/public/admin/config.yml @@ -2,6 +2,7 @@ backend: name: git-gateway branch: master +publish_mode: editorial_workflow 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 @@ -11,8 +12,25 @@ collections: 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: "{{year}}-{{month}}-{{day}}-{{slug}}" # Filename template, e.g., YYYY-MM-DD-title.md + editor: + preview: false # Disable the editor preview and use instead 'preview links' 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" } + - name: "config" + label: "Configuration" + editor: + preview: false + files: + - name: "global" + label: "Global" + file: "src/_data/site.json" + fields: + - { name: "site_name", label: "Site name" } + - { name: "title", label: "Site title" } + - { name: "description", label: "Site description" } + - { name: "url", label: "Site url" } + - { name: "locale", label: "Language" } + - { name: "author", label: "Author" } diff --git a/public/admin/index.html b/public/admin/index.html index 2e1d260..74afc63 100644 --- a/public/admin/index.html +++ b/public/admin/index.html @@ -10,8 +10,5 @@ - diff --git a/src/_includes/layouts/base.ejs b/src/_includes/layouts/base.ejs index 9fdbb77..c6b1182 100644 --- a/src/_includes/layouts/base.ejs +++ b/src/_includes/layouts/base.ejs @@ -46,7 +46,7 @@ "@context": "http://schema.org" } - <% } %> <%- include('webpack.ejs') %> + <% } %><%- include('webpack.ejs') %> <% if (page.url == "/") { %> + <% } %>