Compare commits

...

3 commits

Author SHA1 Message Date
George Cushen
c2e9a799f7 starters: add publication_type filter example 2024-05-13 20:45:41 +01:00
George Cushen
3fa4435e55 starters: add publication_type filter example 2024-05-13 20:33:55 +01:00
George Cushen
41bd113535 feat(collection): add exclude_publication_type filter 2024-05-13 20:33:11 +01:00
6 changed files with 25 additions and 6 deletions

View file

@ -42,6 +42,9 @@
{{ $archive_page = site.GetPage (printf "publication_types/%s" $block.content.filters.publication_type) }}
{{ $query = $query | intersect $archive_page.Pages }}
{{ end }}
{{ if $block.content.filters.exclude_publication_type }}
{{ $query = $query | complement (site.GetPage (printf "publication_types/%s" $block.content.filters.exclude_publication_type)).Pages }}
{{ end }}
{{ if $block.content.filters.author }}
{{ $archive_page = site.GetPage (printf "authors/%s" (urlize $block.content.filters.author)) }}
{{ $query = $query | intersect $archive_page.Pages }}

View file

@ -43,6 +43,9 @@
{{ $archive_page = site.GetPage (printf "publication_types/%s" $block.content.filters.publication_type) }}
{{ $query = $query | intersect $archive_page.Pages }}
{{ end }}
{{ if $block.content.filters.exclude_publication_type }}
{{ $query = $query | complement (site.GetPage (printf "publication_types/%s" $block.content.filters.exclude_publication_type)).Pages }}
{{ end }}
{{ if $block.content.filters.author }}
{{ $archive_page = site.GetPage (printf "authors/%s" (urlize $block.content.filters.author)) }}
{{ $query = $query | intersect $archive_page.Pages }}

View file

@ -1,7 +1,7 @@
name: Deploy website to GitHub Pages
env:
WC_HUGO_VERSION: '0.124.1'
WC_HUGO_VERSION: '0.125.7'
on:
# Trigger the workflow every time you push to the `main` branch

View file

@ -56,6 +56,19 @@ sections:
padding: ['20px', '0', '20px', '0']
css_class: fullscreen
- block: collection
content:
title: Latest Preprints
text: ""
count: 5
filters:
folders:
- publication
publication_type: 'article'
design:
view: citation
columns: '1'
- block: markdown
content:
title:

View file

@ -3,7 +3,7 @@ module github.com/wowchemy/starter-hugo-research-group
go 1.15
require (
github.com/HugoBlox/hugo-blox-builder/modules/blox-bootstrap/v5 v5.9.7
github.com/HugoBlox/hugo-blox-builder/modules/blox-bootstrap/v5 v5.9.8-0.20240513193311-41bd113535e8
github.com/HugoBlox/hugo-blox-builder/modules/blox-plugin-decap-cms v0.1.2-0.20231108143325-448ed0e3bd2b
github.com/HugoBlox/hugo-blox-builder/modules/blox-plugin-netlify v1.1.2-0.20231108143325-448ed0e3bd2b
github.com/HugoBlox/hugo-blox-builder/modules/blox-plugin-netlify v1.1.2-0.20240509231741-c3d23d929bc6
)

View file

@ -3,7 +3,7 @@
publish = "public"
[build.environment]
HUGO_VERSION = "0.123.3"
HUGO_VERSION = "0.125.7"
HUGO_ENABLEGITINFO = "true"
[context.production.environment]