{{/* Shortcode to display Linkding RSS feed bookmarks Usage: {{< linkding-bookmarks >}} */}} {{/* Read the RSS feed file */}} {{ $rssFile := "data/linkding.xml" }} {{ if fileExists $rssFile }} {{ $rssContent := readFile $rssFile }} {{/* Parse RSS XML */}} {{ $rss := $rssContent | transform.Unmarshal }} {{ if $rss }} {{/* Get channel items */}} {{ $items := $rss.channel.item }} {{ if $items }}
{{ range $items }}

{{ .title }}

{{ if .description }}

{{ .description }}

{{ end }} {{ if .category }}
{{ if reflect.IsSlice .category }} {{ range .category }} #{{ . }} {{ end }} {{ else }} #{{ .category }} {{ end }}
{{ end }}
于 {{ dateFormat "2006-01-02" .pubDate }} 添加至书签
{{ end }}
{{ else }}

No bookmarks found in RSS feed.

{{ end }} {{ else }}

Unable to parse RSS feed.

{{ end }} {{ else }}

RSS feed file not found. Please run the GitHub Action to fetch the feed.

{{ end }}