diff --git a/exampleSite/content/home/featured.md b/exampleSite/content/home/featured.md index f3df47e5..7c74def8 100644 --- a/exampleSite/content/home/featured.md +++ b/exampleSite/content/home/featured.md @@ -29,6 +29,7 @@ subtitle = "" tag = "" category = "" publication_type = "" + author = "" [design] # Toggle between the various page layout types. diff --git a/exampleSite/content/home/posts.md b/exampleSite/content/home/posts.md index 12b3b6f3..0071af26 100644 --- a/exampleSite/content/home/posts.md +++ b/exampleSite/content/home/posts.md @@ -28,6 +28,7 @@ subtitle = "" tag = "" category = "" publication_type = "" + author = "" exclude_featured = false [design] diff --git a/exampleSite/content/home/publications.md b/exampleSite/content/home/publications.md index 1d22f863..b0d7d214 100644 --- a/exampleSite/content/home/publications.md +++ b/exampleSite/content/home/publications.md @@ -28,6 +28,7 @@ subtitle = "" tag = "" category = "" publication_type = "" + author = "" exclude_featured = false [design] diff --git a/exampleSite/content/home/talks.md b/exampleSite/content/home/talks.md index 2be02588..bb92b27f 100644 --- a/exampleSite/content/home/talks.md +++ b/exampleSite/content/home/talks.md @@ -28,6 +28,7 @@ subtitle = "" tag = "" category = "" publication_type = "" + author = "" exclude_featured = false exclude_past = false exclude_future = false diff --git a/layouts/partials/widgets/featured.html b/layouts/partials/widgets/featured.html index af8aaaac..95e65920 100644 --- a/layouts/partials/widgets/featured.html +++ b/layouts/partials/widgets/featured.html @@ -24,6 +24,10 @@ {{ $archive_page := site.GetPage (printf "publication_types/%s" $st.Params.content.filters.publication_type) }} {{ $query = $query | intersect $archive_page.Pages }} {{ end }} +{{ if $st.Params.content.filters.author }} + {{ $archive_page = site.GetPage (printf "authors/%s" (urlize $st.Params.content.filters.author)) }} + {{ $query = $query | intersect $archive_page.Pages }} +{{ end }} {{/* Sort */}} {{ $sort_by := "Date" }} diff --git a/layouts/partials/widgets/pages.html b/layouts/partials/widgets/pages.html index 11639dc8..3973229e 100644 --- a/layouts/partials/widgets/pages.html +++ b/layouts/partials/widgets/pages.html @@ -30,6 +30,10 @@ {{ $archive_page = site.GetPage (printf "publication_types/%s" $st.Params.content.filters.publication_type) }} {{ $query = $query | intersect $archive_page.Pages }} {{ end }} +{{ if $st.Params.content.filters.author }} + {{ $archive_page = site.GetPage (printf "authors/%s" (urlize $st.Params.content.filters.author)) }} + {{ $query = $query | intersect $archive_page.Pages }} +{{ end }} {{ if $st.Params.content.filters.exclude_featured }} {{ $query = where $query "Params.featured" "!=" true }} {{ end }}