mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-04-21 07:51:53 +02:00
fix: exclude pages with "xml" = false or "externalUrl" that starts with http/https
This commit is contained in:
parent
c2db79ee4b
commit
c373f45313
1 changed files with 2 additions and 2 deletions
|
@ -27,7 +27,7 @@
|
||||||
{{- with .OutputFormats.Get "RSS" -}}
|
{{- with .OutputFormats.Get "RSS" -}}
|
||||||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{ range $pages }}
|
{{ range $pages }}{{ if and (.Param "xml" | default true) (or (not .Params.externalUrl) (and (.Params.externalUrl) (and (not (hasPrefix .Params.externalUrl "http://")) (not (hasPrefix .Params.externalUrl "https://"))))) }}
|
||||||
<item>
|
<item>
|
||||||
<title>{{ .Title }}</title>
|
<title>{{ .Title }}</title>
|
||||||
<link>{{ .Permalink }}</link>
|
<link>{{ .Permalink }}</link>
|
||||||
|
@ -44,6 +44,6 @@
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</item>
|
</item>
|
||||||
{{ end }}
|
{{ end }}{{ end }}
|
||||||
</channel>
|
</channel>
|
||||||
</rss>
|
</rss>
|
||||||
|
|
Loading…
Add table
Reference in a new issue