From e74bfca7c0fa559b4ca7b19f51673d13b9afec90 Mon Sep 17 00:00:00 2001 From: Cameron Otsuka Date: Fri, 21 Mar 2025 12:09:36 -0700 Subject: [PATCH] iterate through categories --- _data/socials.json | 34 ++++++++++++++++++++-------------- _includes/layouts/base.njk | 15 ++++++++------- eleventy.config.js | 6 ++++++ 3 files changed, 34 insertions(+), 21 deletions(-) diff --git a/_data/socials.json b/_data/socials.json index 82a4068..f30fd6d 100644 --- a/_data/socials.json +++ b/_data/socials.json @@ -1,26 +1,32 @@ -[ - { +{ + "x": { "title": "𝕏", - "url": "https://x.com/CameronOtsuka" + "url": "https://x.com/CameronOtsuka", + "username": "@CameronOtsuka" }, - { + "activitypub": { "title": "ActivityPub", - "url": "https://otsuka.social/@cameron" + "url": "https://otsuka.social/@cameron", + "username": "@cameron@otsuka.social" }, - { + "bluesky": { "title": "Bluesky", - "url": "https://bsky.app/profile/otsuka.haus" + "url": "https://bsky.app/profile/otsuka.haus", + "username": "@otsuka.haus" }, - { + "nostr": { "title": "Nostr", - "url": "https://primal.net/profile/npub1hzssq7wewjztvglpdvku92htx3sv2x5r9ycvqhvl9xrtt5fn629s3np693" + "url": "https://primal.net/profile/npub1hzssq7wewjztvglpdvku92htx3sv2x5r9ycvqhvl9xrtt5fn629s3np693", + "username": "cameron@otsuka.haus" }, - { + "linkedin": { "title": "LinkedIn", - "url": "https://www.linkedin.com/in/cotsuka" + "url": "https://www.linkedin.com/in/cotsuka", + "username": "cotsuka" }, - { + "github": { "title": "GitHub", - "url": "https://github.com/cotsuka" + "url": "https://github.com/cotsuka", + "username": "cotsuka" } -] \ No newline at end of file +} \ No newline at end of file diff --git a/_includes/layouts/base.njk b/_includes/layouts/base.njk index b3731aa..1b99384 100644 --- a/_includes/layouts/base.njk +++ b/_includes/layouts/base.njk @@ -13,9 +13,9 @@ - + - + @@ -26,12 +26,13 @@ + {%- set categories = metadata.categories | keys %} {%- if tags %} - {%- for tag in tags | reject("equalto", "articles") | reject("equalto", "links") | reject("equalto", "reviews") %} + {%- for tag in tags | notIn(categories) %} {%- endfor %} {%- else %} @@ -41,9 +42,9 @@ - - - + {%- for category in categories %} + + {%- endfor %} @@ -77,7 +78,7 @@