mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-22 22:13:12 +01:00
27 lines
1.4 KiB
XML
27 lines
1.4 KiB
XML
{{- $isReadingListRoot := eq (path.Dir (path.Dir .RelPermalink)) "/" -}}
|
|
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
|
{{- printf "<?xml-stylesheet href=\"/opml.xsl\" type=\"text/xsl\"?>" | safeHTML }}
|
|
<opml version="2.0">
|
|
<head>
|
|
<title>{{ .Title }}{{- if not $isReadingListRoot }} (reading lists byJP){{ end }}</title>
|
|
<dateModified>{{ .Lastmod.Format "02 Jan 2006 15:04 MST" }}</dateModified>
|
|
<ownerId>https://www.byjp.me</ownerId>
|
|
</head>
|
|
<body>
|
|
{{ range .Pages -}}
|
|
{{ if .Params.feed -}}
|
|
<outline {{ if .Date }}created="{{ .Date.Format "02 Jan 2006 15:04 MST" }}" {{ end }}title="{{ .Title }}" text="{{ .Title }}" type="rss" xmlUrl="{{ .Params.feed.rss }}" htmlUrl="{{ .Params.feed.url }}" description="{{ .Summary }}"/>
|
|
{{ end -}}
|
|
|
|
{{- if gt (len .Pages) 0 }}
|
|
<outline {{ if .Date }}created="{{ .Date.Format "02 Jan 2006 15:04 MST" }}" {{ end }}title="{{ .Title }}" text="{{ .Title }}" type="html" htmlUrl="{{ .Permalink }}" description="{{ .Summary }}">
|
|
{{ range .Pages -}}
|
|
{{ if .Params.feed -}}
|
|
<outline {{ if .Date }}created="{{ .Date.Format "02 Jan 2006 15:04 MST" }}" {{ end }}title="{{ .Title }}" text="{{ .Title }}" type="rss" xmlUrl="{{ .Params.feed.rss }}" htmlUrl="{{ .Params.feed.url }}" description="{{ .Summary }}"/>
|
|
{{ end -}}
|
|
{{ end -}}
|
|
</outline>
|
|
{{ end }}
|
|
{{ end }}
|
|
</body>
|
|
</opml>
|