From 46376293448fe07909a993dd0ecab5d8e05b993d Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Wed, 10 Jan 2024 12:32:54 -0800 Subject: [PATCH] feat: add links page --- package.json | 2 +- src/_data/links.js | 2 ++ src/_data/nav.js | 1 + src/links.html | 22 ++++++++++++++++++++++ 4 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 src/links.html diff --git a/package.json b/package.json index 5940919a..304d5273 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coryd.dev", - "version": "4.4.0", + "version": "4.5.0", "description": "The source for my personal site, blog and portfolio. Built using 11ty and hosted on Netlify.", "type": "module", "scripts": { diff --git a/src/_data/links.js b/src/_data/links.js index b3134b9c..474a12f0 100644 --- a/src/_data/links.js +++ b/src/_data/links.js @@ -19,6 +19,8 @@ export default async function () { url: link['source_url'], tags: [...new Set(Object.keys(link['tags']))], date: link['created_at'], + summary: link['summary'], + note: link['notes'], description: `${link['summary']}

`, } }) diff --git a/src/_data/nav.js b/src/_data/nav.js index 9a222578..69e5d9d6 100644 --- a/src/_data/nav.js +++ b/src/_data/nav.js @@ -11,6 +11,7 @@ export default async function () { { name: 'Now' }, { name: 'About' }, { name: 'Tags', icon: 'tags' }, + { name: 'Links', icon: 'link' }, { name: 'Search', icon: 'search' }, { name: 'Feeds', icon: 'rss' }, { name: 'Mastodon', icon: 'brand-mastodon' }, diff --git a/src/links.html b/src/links.html new file mode 100644 index 00000000..019140f4 --- /dev/null +++ b/src/links.html @@ -0,0 +1,22 @@ +--- +title: Links +layout: default +pagination: + data: links + size: 8 +--- +{% for link in links %} +
+ +

{{ link.title }}

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

{{ link.note | markdown }}

+ {% endif -%} +
+{% endfor %} +{% include "partials/paginator.liquid" %} \ No newline at end of file