From ce8cb00655b42097267f0825995c4293bcaa1a5e Mon Sep 17 00:00:00 2001 From: Thiago Rossener Date: Tue, 4 Feb 2020 20:14:12 -0300 Subject: [PATCH] Added new fields to Netlify CMS --- _config.yml | 1 + _layouts/home.html | 2 +- admin/config.yml | 22 ++++++++++++++++++++++ src/yml/site.yml | 1 + 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index e2f4bd05ec..5d190c2648 100644 --- a/_config.yml +++ b/_config.yml @@ -11,6 +11,7 @@ tags: email: youremail@xyz.com disqus_username: disqus_username show_hero: true +paginate: 0 categories_folder: category sent_message_url: "/contact/message-sent/" menu: diff --git a/_layouts/home.html b/_layouts/home.html index 80b7597434..f0c005fea4 100644 --- a/_layouts/home.html +++ b/_layouts/home.html @@ -45,7 +45,7 @@

{{ featured.title }}

{% for post in posts offset: offset %}
- + {{ post.category }} diff --git a/admin/config.yml b/admin/config.yml index 9e9a2e4308..b4ed2eea29 100644 --- a/admin/config.yml +++ b/admin/config.yml @@ -213,6 +213,19 @@ collections: name: "show_hero" widget: "boolean" default: true + - label: "Menu" + name: "menu" + widget: "list" + required: false + fields: + - label: "Title" + name: "title" + widget: "string" + hint: "Text that will show up in the menu" + - label: "URL" + name: "url" + widget: "string" + hint: "Ex: /contact" - label: "E-mail" name: "email" widget: "string" @@ -229,6 +242,15 @@ collections: valueType: "int" required: false hint: "Leave it blank if you don't want pagination" + - label: "Categories folder" + name: "categories_folder" + widget: "string" + hint: "Folder where all the categories pages are. Ex: category" + required: false + - label: "Contact Feedback URL" + name: "sent_message_url" + hint: "URL where the user will be redirected for after submit the contact form. Ex: /contact/message-sent/" + required: false - label: "Social" name: "social" file: "src/yml/social.yml" diff --git a/src/yml/site.yml b/src/yml/site.yml index a3cabb2303..850752ecb1 100644 --- a/src/yml/site.yml +++ b/src/yml/site.yml @@ -10,6 +10,7 @@ tags: email: youremail@xyz.com disqus_username: disqus_username show_hero: true +paginate: 0 categories_folder: category sent_message_url: "/contact/message-sent/" menu: