diff --git a/_includes/content-questions.html b/_includes/content-questions.html index e0187255d..2edff7d84 100644 --- a/_includes/content-questions.html +++ b/_includes/content-questions.html @@ -2,8 +2,9 @@
{% assign categories = site.content | group_by:"category" %} + {% assign promoted_site_categories = site.categories | where "promoted" %} - {% for site_category in site.categories %} + {% for site_category in promoted_site_categories limit:6 %} {% assign current_category = categories | where:"name", site_category.name | first %} {% assign category_questions = current_category.items %}
diff --git a/_plugins/jekyll_config_netlify_cms.rb b/_plugins/jekyll_config_netlify_cms.rb index 37b55983a..e7e0d78cf 100644 --- a/_plugins/jekyll_config_netlify_cms.rb +++ b/_plugins/jekyll_config_netlify_cms.rb @@ -18,7 +18,8 @@ {'label' => 'Layout', 'name' => 'layout', 'widget' => 'hidden', 'default' => 'post'}, {'label' => 'Title', 'name' => 'title', 'widget' => 'string'}, {'label' => 'Category', 'name' => 'category', 'widget' => 'string'}, - {'label' => 'Source', 'name' => 'source', 'widget' => 'string'}, + {'label' => 'Source name', 'name' => 'source', 'widget' => 'string'}, + {'label' => 'Source link', 'name' => 'source_url', 'widget' => 'string'}, {'label' => 'Promoted', 'name' => 'promoted', 'widget' => 'boolean', 'default' => false}, { 'label' => 'Publish Date', diff --git a/admin/config.yml b/admin/config.yml index a56662473..0cd179ca7 100644 --- a/admin/config.yml +++ b/admin/config.yml @@ -24,6 +24,7 @@ collections: - {label: 'Layout', name: 'layout', widget: 'hidden', default: 'category'} - {label: 'Name', name: 'name', widget: 'string'} - {label: 'Title', name: 'title', widget: 'string'} + - {label: 'Show on homepage', name 'promoted', widget: "boolean", default: false} - label: 'Banner' name: 'banner' widget: 'object'