From c220ae7623cd788008bf7e0855f2ba2e1f100bdd Mon Sep 17 00:00:00 2001 From: Laura Gerhardt Date: Thu, 19 Mar 2020 15:32:28 -0400 Subject: [PATCH] fix local dev and update netlify label --- _categories/basics.md | 3 ++- _categories/protect-yourself.md | 3 ++- _categories/spread.md | 3 ++- _categories/symptoms-and-testing.md | 3 ++- _categories/travel.md | 3 ++- _plugins/jekyll_config_netlify_cms.rb | 5 ++--- admin/_config.yml | 3 +-- 7 files changed, 13 insertions(+), 10 deletions(-) diff --git a/_categories/basics.md b/_categories/basics.md index 481a4c4e5..b2126e641 100644 --- a/_categories/basics.md +++ b/_categories/basics.md @@ -2,7 +2,8 @@ layout: category name: basics title: "About COVID-19" -promoted: true +promoted: false +owner: CDC homepage_order: 1 banner: display: false diff --git a/_categories/protect-yourself.md b/_categories/protect-yourself.md index 6cadc43e7..08c4fe515 100644 --- a/_categories/protect-yourself.md +++ b/_categories/protect-yourself.md @@ -2,7 +2,8 @@ layout: category name: protect-yourself title: "How to protect yourself" -promoted: true +promoted: false +owner: CDC homepage_order: 2 banner: display: false diff --git a/_categories/spread.md b/_categories/spread.md index b63b5dbfe..e843603db 100644 --- a/_categories/spread.md +++ b/_categories/spread.md @@ -2,7 +2,8 @@ layout: category name: spread title: "How it spreads" -promoted: true +promoted: false +owner: CDC homepage_order: 4 banner: display: false diff --git a/_categories/symptoms-and-testing.md b/_categories/symptoms-and-testing.md index faaace96a..f664b8c37 100644 --- a/_categories/symptoms-and-testing.md +++ b/_categories/symptoms-and-testing.md @@ -2,7 +2,8 @@ layout: category name: symptoms-and-testing title: "Symptoms and testing" -promoted: true +promoted: false +owner: CDC homepage_order: 3 banner: display: false diff --git a/_categories/travel.md b/_categories/travel.md index d004ae68e..c0066982b 100644 --- a/_categories/travel.md +++ b/_categories/travel.md @@ -2,7 +2,8 @@ layout: category name: travel title: "Traveling" -promoted: true +promoted: false +owner: CDC homepage_order: 5 banner: display: false diff --git a/_plugins/jekyll_config_netlify_cms.rb b/_plugins/jekyll_config_netlify_cms.rb index 35d78fe8f..64b0df19f 100644 --- a/_plugins/jekyll_config_netlify_cms.rb +++ b/_plugins/jekyll_config_netlify_cms.rb @@ -49,13 +49,12 @@ def dump_yaml(path, hash) end def find_owner(folder_path, categories) - puts folder_path return "" if folder_path.nil? category = categories.find { |category| category.data['name'] == folder_path } - "Owner:#{category.data['owner']} Posts:" + "Owner: #{category.data['owner']} " end def make_label(paths, categories) owner = find_owner(paths.first, categories) - owner + paths.join(' | ').gsub(/-/, ' ').capitalize() + owner + "Category: " + paths.join(' | ').gsub(/-/, ' ').capitalize() end \ No newline at end of file diff --git a/admin/_config.yml b/admin/_config.yml index a20f8b1b6..ee3b781a2 100644 --- a/admin/_config.yml +++ b/admin/_config.yml @@ -13,8 +13,6 @@ backend: branch: dev #this will need to be changed once we deploy use_graphql: true -local_backend: true - media_folder: assets/uploads public_folder: /images/uploads publish_mode: editorial_workflow @@ -85,6 +83,7 @@ collections: - {label: 'Layout', name: 'layout', widget: 'hidden', default: 'category'} - {label: 'Name', name: 'name', widget: 'string'} - {label: 'Title', name: 'title', widget: 'string'} + - {label: 'Owner', name: 'owner', widget: 'string'} - {label: 'Show on homepage', name: 'promoted', widget: "boolean", default: false} - label: 'Banner' name: 'banner'