diff --git a/exampleSite/content/home/projects.md b/exampleSite/content/home/projects.md index a9bf0e73..257e8e55 100644 --- a/exampleSite/content/home/projects.md +++ b/exampleSite/content/home/projects.md @@ -1,6 +1,5 @@ +++ # Projects widget. -# This widget displays all projects from `content/project/`. widget = "projects" active = true date = "2016-04-20T00:00:00" @@ -11,6 +10,11 @@ subtitle = "" # Order that this section will appear in. weight = 50 +# Content. +# Display content from the following folder. +# For example, `folder = "project"` displays content from `content/project/`. +folder = "project" + # View. # Customize how projects are displayed. # Legend: 0 = list, 1 = cards. @@ -27,7 +31,7 @@ filter_default = 0 [[filter]] name = "All" tag = "*" - + [[filter]] name = "Deep Learning" tag = ".deep-learning" diff --git a/layouts/partials/widgets/projects.html b/layouts/partials/widgets/projects.html index 30a6d610..2f750064 100644 --- a/layouts/partials/widgets/projects.html +++ b/layouts/partials/widgets/projects.html @@ -34,7 +34,7 @@ {{ if eq $page.Params.view 0 }}
- {{ range where $.Site.RegularPages "Type" "project" }} + {{ range where $.Site.RegularPages "Type" ($page.Params.folder | default "project") }}
@@ -56,7 +56,7 @@
- {{ range $project := where $.Site.RegularPages "Type" "project" }} + {{ range $project := where $.Site.RegularPages "Type" ($page.Params.folder | default "project") }} {{ $.Scratch.Set "project_url" $project.Permalink }} {{ $.Scratch.Set "target" "" }} {{ if $project.Params.external_link }}