Fix some art not being excluded from the feed
This commit is contained in:
parent
1150bee723
commit
fce515b4e1
5 changed files with 23 additions and 7 deletions
|
@ -22,7 +22,7 @@
|
|||
{{ $dates = dict "date" (time.AsTime $data.date) }}
|
||||
{{ else }}
|
||||
{{ $dates = dict "date" (time.AsTime (printf "%s-01-01" $data.date)) }}
|
||||
{{ $exclude_feed := true }}
|
||||
{{ $exclude_feed = true }}
|
||||
{{ end }}
|
||||
|
||||
{{ $title := "Untitled Artwork" }}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"date": "2023-11-25",
|
||||
"program": "Krita",
|
||||
"title": "three legs"
|
||||
"title": "three legs",
|
||||
"nsfw": true
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"date": "2024-04-24",
|
||||
"program": "Krita",
|
||||
"title": "Awkward"
|
||||
"title": "Awkward",
|
||||
"nsfw": true
|
||||
}
|
||||
|
|
|
@ -9,5 +9,6 @@
|
|||
"tags": [
|
||||
"artfight"
|
||||
],
|
||||
"title": "Farm-hands"
|
||||
"title": "Farm-hands",
|
||||
"nsfw": true
|
||||
}
|
||||
|
|
|
@ -50,8 +50,9 @@
|
|||
{{ range $pages }}
|
||||
{{ $isguest := (.Param "guest") }}
|
||||
{{ $exclude := (.Param "excludefeed") }}
|
||||
{{ $isnsfw := (.Param "nsfw") }}
|
||||
|
||||
{{ if and (not $isguest) (not $exclude) }}
|
||||
{{ if and (and (not $isguest) (not $exclude)) (not $isnsfw) }}
|
||||
<item>
|
||||
{{ with .Title }}
|
||||
<title>{{ . }}</title>
|
||||
|
@ -76,8 +77,20 @@
|
|||
{{ end }}
|
||||
|
||||
<content:encoded>{{ "<![CDATA[" | safeHTML }}
|
||||
{{ $pageScope := . }}
|
||||
{{ partial "render-art" . }}
|
||||
{{/* Partial used to display a thumbnail of an artwork. */}}
|
||||
|
||||
{{ $full := printf "%s/thumb/%s.avif" $.Site.Params.image_host .Params.slug }}
|
||||
{{ $jpeg := printf "%s/thumb/%s.jpg" $.Site.Params.image_host .Params.slug }}
|
||||
|
||||
<a aria-label="Gallery Item" class="no-decoration grid-item" href="{{ .RelPermalink }}">
|
||||
|
||||
{{ $title := .Title }}
|
||||
{{ $year := .Date.Format "2006" }}
|
||||
<picture>
|
||||
<source srcset="{{ $full }}" type="image/avif" width="{{ $.Params.thumb_width }}" height="{{ $.Params.thumb_height }}"/>
|
||||
<img style="width: 100%; height: auto;" alt="{{ $.Params.alt_text }}" title="{{ $title }} ({{ $year }})" width="{{ $.Params.thumb_width }}" height="{{ $.Params.thumb_height }}" src="{{ $jpeg }}"/>
|
||||
</picture>
|
||||
</a>
|
||||
|
||||
{{ with .Content }}
|
||||
<p>{{ . | safeHTML }}</p>
|
||||
|
|
Loading…
Add table
Reference in a new issue