From 35c5600c9c9a7dbf7adb81df9becb763cb6896b0 Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Wed, 10 Jan 2024 13:07:40 -0800 Subject: [PATCH] chore: add link page template to readwise post --- .../2024/link-blogging-using-readwise.md | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/src/posts/2024/link-blogging-using-readwise.md b/src/posts/2024/link-blogging-using-readwise.md index 396341b2..c3779150 100644 --- a/src/posts/2024/link-blogging-using-readwise.md +++ b/src/posts/2024/link-blogging-using-readwise.md @@ -65,7 +65,34 @@ This fetches links from my archive (so that it's much more likely that I've read ``` {% endraw %} -Now, however, I've gone ahead and added the `notes` field from Readwise's API response to the `data` I expose in my `links.js` file above and constructed [an additional top level page](/links), complete with pagination. This top level page formats my shared links much like the posts on my home page, adds the summary Readwise fetches as a `
` and, if I've added notes to the document (which I'll now aim to do more consistently), it will render them below the `
`. Now, *all* of the links I've shared are at least visible *somewhere* on my site instead of the five most recent on [my now page](/now). +Now, however, I've gone ahead and added the `notes` field from Readwise's API response to the `data` I expose in my `links.js` file above and constructed [an additional top level page](/links), complete with pagination. This top level page formats my shared links much like the posts on my home page, adds the summary Readwise fetches as a `
` and, if I've added notes to the document (which I'll now aim to do more consistently), it will render them below the `
`. Now, *all* of the links I've shared are at least visible *somewhere* on my site instead of the five most recent on [my now page](/now). The `links` page template looks like this: + +{% raw %} +```liquid +--- +title: Links +layout: default +pagination: + data: links + size: 8 +--- +{% for link in links %} +
+ +

{{ link.title }}

+
+ +
{{ link.summary }}
+ {%- if link.note %} +

{{ link.note }}

+ {% endif -%} +
+{% endfor %} +{% include "partials/paginator.liquid" %} +``` +{% endraw %} There you have it — link blogging via Readwise Reader[^1].