diff --git a/.eleventy.js b/.eleventy.js index 63417b22..07888987 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -160,7 +160,9 @@ module.exports = function (eleventyConfig) { } if (item.data.links) { item.data.links.forEach((link) => { - const tagString = [...new Set(link.tags.map((tag) => tagAliases[tag.toLowerCase()]))] + const tagString = [ + ...new Set(link.tags.split(',').map((tag) => tagAliases[tag.toLowerCase()])), + ] .join(' ') .trim() if (tagString) tags[link.url] = tagString diff --git a/_redirects b/_redirects index 1943a00f..626a2bf9 100644 --- a/_redirects +++ b/_redirects @@ -52,6 +52,8 @@ https://cdme.netlify.app https://coryd.dev 301! /feed.json https://feedpress.me/coryd.json /books.xml https://feedpress.me/coryd-books /books.json https://feedpress.me/coryd-books.json +/links.xml https://feedpress.me/coryd-links +/links.json https://feedpress.me/coryd-links.json /follow.xml https://feedpress.me/coryd-follow /follow.json https://feedpress.me/coryd-follow.json diff --git a/src/_data/json/links.json b/src/_data/json/links.json index b7c52629..2b6a8d73 100644 --- a/src/_data/json/links.json +++ b/src/_data/json/links.json @@ -5,14 +5,14 @@ "tags": "development", "title": "What Happened to Separation of Concerns in Frontend Development", "id": "https://meiert.com/en/blog/what-happened-to-separation-of-concerns/", - "link": "https://meiert.com/en/blog/what-happened-to-separation-of-concerns/" + "url": "https://meiert.com/en/blog/what-happened-to-separation-of-concerns/" }, { "date": "Tue, 31 Oct 2023 10:27:36 -0700", "tags": "development", "title": "It's 2023, here is why your web design sucks.", "id": "https://heather-buchel.com/blog/2023/10/why-your-web-design-sucks/", - "link": "https://heather-buchel.com/blog/2023/10/why-your-web-design-sucks/" + "url": "https://heather-buchel.com/blog/2023/10/why-your-web-design-sucks/" } ] } diff --git a/src/_data/links.js b/src/_data/links.js new file mode 100644 index 00000000..f925927e --- /dev/null +++ b/src/_data/links.js @@ -0,0 +1,5 @@ +const links = require('../_data/json/links.json') + +module.exports = async function () { + return links.links +} diff --git a/src/_includes/now.liquid b/src/_includes/now.liquid index 7f4c5cf3..befb6f6f 100644 --- a/src/_includes/now.liquid +++ b/src/_includes/now.liquid @@ -7,6 +7,7 @@ layout: main {% render "partials/now/media-grid.liquid", data:music.albums, icon: "vinyl", title: "Albums", shape: "square", count: 8 %} {% render "partials/now/albumReleases.liquid", albumReleases:albumReleases %} {% render "partials/now/media-grid.liquid", data:books, icon: "books", title: "Books", shape: "vertical", count: 6 %} +{% render "partials/now/links.liquid", links:links %} {% render "partials/now/media-grid.liquid", data:movies, icon: "movie", title: "Movies", shape: "vertical", count: 6 %} {% render "partials/now/media-grid.liquid", data:tv, icon: "device-tv", title: "TV", shape: "vertical", count: 6 %} <p class="text-xs text-center pt-6">This is a diff --git a/src/_includes/partials/now/links.liquid b/src/_includes/partials/now/links.liquid new file mode 100644 index 00000000..b71109fe --- /dev/null +++ b/src/_includes/partials/now/links.liquid @@ -0,0 +1,15 @@ +{% if links.size > 0 %} + <h2 class="[&>svg]:h-5 [&>svg]:w-5 [&>svg]:md:h-7 [&>svg]:md:w-7 [&>svg]:-mt-1 [&>svg]:md:-mt-1.5 [&>svg]:inline icon--bold m-0 text-xl font-black leading-tight tracking-normal dark:text-gray-200 md:text-2xl mt-8 mb-4"> + {% tablericon "link" "Links" %} + Links + </h2> + <ul class="list-inside list-disc pl-5 md:pl-10"> + {% for link in links limit: 5 %} + <li class="mt-1.5 mb-2"> + <a href="{{link.url}}" title="{{link.title | escape}}"> + {{ link.title }} + </a> + </li> + {% endfor %} + </ul> +{% endif %} \ No newline at end of file diff --git a/src/feeds/links.liquid b/src/feeds/links.liquid new file mode 100644 index 00000000..a9a7318a --- /dev/null +++ b/src/feeds/links.liquid @@ -0,0 +1,13 @@ +--- +layout: null +eleventyExcludeFromCollections: true +permalink: /feeds/links +--- +{% render "partials/feeds/rss.liquid" + permalink:"/feeds/links" + title:"Links • Cory Dransfeldt" + description:"Links I've liked." + data:links + updated:links[0].date + site:site +%} \ No newline at end of file