loura.paste.lol / micro-blog-bookmarks-shortcode · 9 months ago·

{{< bookmarks >}}
  {{ range .items }}
    {{ $url := urls.Parse .url }}

    {{ if not (hasPrefix .id "link") }}
      {{ if (strings.Contains .tags "code")  }}
        <figure class="bookmark">
          <blockquote>
            <p>{{ replace (replace ( .content_html | plainify | truncate 300 ) "Reader: " "") $url.Host "" }}</p>
          </blockquote>
          <figcaption><cite><a class="u-bookmark-of" href="{{ .url }}">{{ $url.Host }}</a><br/><small>Bookmarked: {{ time.Format "Jan 2, 2006" .date_published}}</small><br/><small class="tags">{{ .tags }}</small></cite>

          </figcaption>
        </figure>
      {{ end }}
    {{ end }}
  {{ end }}
{{< /bookmarks >}}