From f162f04a6e63d9815dc3dedf051e45b533db84c6 Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Sat, 8 Jul 2023 12:57:37 -0700 Subject: [PATCH] chore: refactor includes to render --- src/404.html | 2 +- src/_data/site.js | 12 +++++++ src/_data/site.json | 19 ----------- src/_includes/base.liquid | 2 +- src/_includes/default.liquid | 2 +- src/_includes/icons/apple-music.liquid | 24 +++++++------- src/_includes/icons/coffee.liquid | 25 +++++++------- src/_includes/icons/fastmail.liquid | 36 ++++++++++----------- src/_includes/icons/github.liquid | 24 +++++++------- src/_includes/icons/letterboxd.liquid | 24 +++++++------- src/_includes/icons/mastodon.liquid | 24 +++++++------- src/_includes/icons/trakt.liquid | 24 +++++++------- src/_includes/main.liquid | 2 +- src/_includes/now.liquid | 2 +- src/_includes/partials/author.liquid | 3 +- src/_includes/partials/footer.liquid | 14 ++++---- src/_includes/partials/header.liquid | 2 +- src/_includes/partials/nav.liquid | 6 ++-- src/_includes/partials/popular-posts.liquid | 2 +- src/_includes/post.liquid | 10 +++--- src/search.html | 2 +- 21 files changed, 119 insertions(+), 142 deletions(-) create mode 100644 src/_data/site.js delete mode 100644 src/_data/site.json diff --git a/src/404.html b/src/404.html index 8c4f9f92..ee8e665f 100644 --- a/src/404.html +++ b/src/404.html @@ -21,4 +21,4 @@ permalink: 404.html
-{% include "partials/popular-posts.liquid" %} +{% render "partials/popular-posts.liquid", posts: collections.posts, analytics: analytics %} diff --git a/src/_data/site.js b/src/_data/site.js new file mode 100644 index 00000000..09f92949 --- /dev/null +++ b/src/_data/site.js @@ -0,0 +1,12 @@ +module.exports = async function () { + return { + "name": "Cory Dransfeldt", + "email": "hi@coryd.dev", + "url": "https://coryd.dev", + "logo": "https://coryd.dev/assets/img/logo.webp", + "title": "Cory Dransfeldt", + "description": "I'm a software developer in Camarillo, California. I enjoy hanging out with my beautiful family and 4 rescue dogs, technology, automation, music, writing, reading and tv and movies.", + "letterboxd-host": "https://a.ltrbxd.com", + "cdn-movies": "https://movies.coryd.dev" + } +} diff --git a/src/_data/site.json b/src/_data/site.json deleted file mode 100644 index 5119c3b5..00000000 --- a/src/_data/site.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "Cory Dransfeldt", - "email": "hi@coryd.dev", - "url": "https://coryd.dev", - "logo": "https://coryd.dev/assets/img/logo.webp", - "title": "Cory Dransfeldt", - "description": "I'm a software developer in Camarillo, California. I enjoy hanging out with my beautiful family and 4 rescue dogs, technology, automation, music, writing, reading and tv and movies.", - "fastmail": "mailto:hi@coryd.dev", - "github": "https://github.com/cdransf", - "mastodon": "https://social.lol/@cory", - "applemusic": "https://music.apple.com/profile/cdransf", - "listenbrainz": "https://listenbrainz.org/user/cdransf/", - "instapaper": "https://www.instapaper.com/p/coryd", - "letterboxd": "https://letterboxd.com/cdme", - "letterboxd-host": "https://a.ltrbxd.com", - "trakt": "https://trakt.tv/users/cdransf", - "coffee": "https://www.buymeacoffee.com/cory", - "cdn-movies": "https://movies.coryd.dev" -} diff --git a/src/_includes/base.liquid b/src/_includes/base.liquid index 4102f344..b8032c1a 100644 --- a/src/_includes/base.liquid +++ b/src/_includes/base.liquid @@ -31,7 +31,7 @@ {% capture css %} - {% include "../assets/styles/prism.css" %} + {% render "../assets/styles/prism.css" %} {% endcapture %} -{% include "partials/popular-posts.liquid" %} +{% render "partials/popular-posts.liquid", posts: collections.posts, analytics: analytics %}