diff --git a/exampleSite/content/home/about.md b/exampleSite/content/home/about.md index 38051dd0..89103dce 100644 --- a/exampleSite/content/home/about.md +++ b/exampleSite/content/home/about.md @@ -1,10 +1,8 @@ +++ # About/Biography widget. - -date = "2016-04-20T00:00:00" -draft = false - widget = "about" +active = true +date = "2016-04-20T00:00:00" # Order that this section will appear in. weight = 5 diff --git a/exampleSite/content/home/contact.md b/exampleSite/content/home/contact.md index d5ef648b..61657582 100644 --- a/exampleSite/content/home/contact.md +++ b/exampleSite/content/home/contact.md @@ -1,12 +1,11 @@ +++ # Contact widget. - +widget = "contact" +active = true date = "2016-04-20T00:00:00" -draft = false title = "Contact" subtitle = "" -widget = "contact" # Order that this section will appear in. weight = 70 diff --git a/exampleSite/content/home/hero.md b/exampleSite/content/home/hero.md index 56a93188..f5389531 100644 --- a/exampleSite/content/home/hero.md +++ b/exampleSite/content/home/hero.md @@ -1,11 +1,10 @@ +++ # Hero widget. - +widget = "hero" +active = true date = 2017-10-15 -draft = false title = "Academic" -widget = "hero" # Order that this section will appear in. weight = 3 diff --git a/exampleSite/content/home/posts.md b/exampleSite/content/home/posts.md index d23ef205..9a274b86 100644 --- a/exampleSite/content/home/posts.md +++ b/exampleSite/content/home/posts.md @@ -1,13 +1,12 @@ +++ # Recent Posts widget. # This widget displays recent posts from `content/post/`. - +widget = "posts" +active = true date = "2016-04-20T00:00:00" -draft = false title = "Recent Posts" subtitle = "" -widget = "posts" # Order that this section will appear in. weight = 40 diff --git a/exampleSite/content/home/projects.md b/exampleSite/content/home/projects.md index 70b496e7..a9bf0e73 100644 --- a/exampleSite/content/home/projects.md +++ b/exampleSite/content/home/projects.md @@ -1,13 +1,12 @@ +++ # Projects widget. # This widget displays all projects from `content/project/`. - +widget = "projects" +active = true date = "2016-04-20T00:00:00" -draft = false title = "Projects" subtitle = "" -widget = "projects" # Order that this section will appear in. weight = 50 diff --git a/exampleSite/content/home/publications.md b/exampleSite/content/home/publications.md index fe8b76a1..b0ed0f0f 100644 --- a/exampleSite/content/home/publications.md +++ b/exampleSite/content/home/publications.md @@ -1,13 +1,12 @@ +++ # Recent Publications widget. # This widget displays recent publications from `content/publication/`. - +widget = "publications" +active = true date = 2016-04-20 -draft = false title = "Recent Publications" subtitle = "" -widget = "publications" # Order that this section will appear in. weight = 20 diff --git a/exampleSite/content/home/publications_selected.md b/exampleSite/content/home/publications_selected.md index ee6ab2be..60edf71a 100644 --- a/exampleSite/content/home/publications_selected.md +++ b/exampleSite/content/home/publications_selected.md @@ -2,13 +2,12 @@ # Selected Publications widget. # This widget displays publications from `content/publication/` which have # `selected = true` in their `+++` front matter. - +widget = "publications_selected" +active = true date = 2016-04-20 -draft = false title = "Selected Publications" subtitle = "" -widget = "publications_selected" # Order that this section will appear in. weight = 10 diff --git a/exampleSite/content/home/tags.md b/exampleSite/content/home/tags.md index cedab850..eca1a32f 100644 --- a/exampleSite/content/home/tags.md +++ b/exampleSite/content/home/tags.md @@ -1,12 +1,11 @@ +++ # Tag Cloud widget. - +widget = "tag_cloud" +active = true date = 2017-09-20 -draft = false title = "Tags" subtitle = "" -widget = "tag_cloud" # Order that this section will appear in. weight = 65 diff --git a/exampleSite/content/home/talks.md b/exampleSite/content/home/talks.md index ae290433..86065190 100644 --- a/exampleSite/content/home/talks.md +++ b/exampleSite/content/home/talks.md @@ -1,12 +1,11 @@ +++ # Recent and Upcoming Talks widget. - +widget = "talks" +active = true date = "2016-04-20T00:00:00" -draft = false title = "Recent & Upcoming Talks" subtitle = "" -widget = "talks" # Order that this section will appear in. weight = 30 diff --git a/exampleSite/content/home/teaching.md b/exampleSite/content/home/teaching.md index d96b8ef0..0b1ed6bd 100644 --- a/exampleSite/content/home/teaching.md +++ b/exampleSite/content/home/teaching.md @@ -1,13 +1,14 @@ +++ +# Custom widget. # An example of using the custom widget to create your own homepage section. # To create more sections, duplicate this file and edit the values below as desired. - +widget = "custom" +active = true date = "2016-04-20T00:00:00" -draft = false +# Note: a full width section format can be enabled by commenting out the `title` and `subtitle` with a `#`. title = "Teaching" subtitle = "" -widget = "custom" # Order that this section will appear in. weight = 60 diff --git a/layouts/partials/widget_page.html b/layouts/partials/widget_page.html index a620716a..6268ac5b 100644 --- a/layouts/partials/widget_page.html +++ b/layouts/partials/widget_page.html @@ -12,7 +12,7 @@ {{ $section := .Scratch.Get "section" }} -{{ range $index, $page := where .Data.Pages "Section" $section }} +{{ range $index, $page := where (where .Data.Pages "Section" $section) ".Params.active" "!=" false }} {{ $params := dict "root" $ "page" $page }} {{ $widget := printf "widgets/%s.html" ( or $page.Params.widget "custom" ) }} {{ if eq $page.Params.widget "hero" }}