davideisinger.com

My personal website
Log | Files | Refs | README

commit 68b37be4a32d9d062ffc34649aec091695a383d1
parent 7949911256d6ece1498617df9faeeb0a24400896
Author: David Eisinger <[email protected]>
Date:   Mon,  9 Jan 2023 23:52:50 -0500

Add Pinboard links

Diffstat:
Mthemes/v2/layouts/index.html | 2++
Athemes/v2/layouts/partials/pinboard.html | 16++++++++++++++++
2 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/themes/v2/layouts/index.html b/themes/v2/layouts/index.html @@ -1,3 +1,5 @@ {{ define "main" }} {{ .Content }} + + {{- partial "pinboard.html" . -}} {{ end }} diff --git a/themes/v2/layouts/partials/pinboard.html b/themes/v2/layouts/partials/pinboard.html @@ -0,0 +1,16 @@ +<section> + <hr> + + {{ with getJSON "https://feeds.pinboard.in/json/u:DCE/" }} + <h3>Links (from <a href="https://pinboard.in/u:DCE">Pinboard</a>)</h3> + + <ul> + {{ range first 5 . }} + <li> + <a href="{{ .u }}">{{ .d }}</a> ({{ dateFormat "2006-01-02" .dt}}) + <p>{{ .n }}</p> + </li> + {{ end }} + </ul> + {{ end }} +</section>