From 55e67d1e279a70570d292e697902f41682b2925f Mon Sep 17 00:00:00 2001 From: Leyla Becker Date: Thu, 19 Feb 2026 17:35:13 -0600 Subject: [PATCH 1/2] feat: localized time on cards --- index.njk | 3 ++- posts-index.njk | 2 +- recipes-index.njk | 1 + recipes/recipes.11tydata.js | 19 +++++++++++++++++++ tags.njk | 3 ++- 5 files changed, 25 insertions(+), 3 deletions(-) diff --git a/index.njk b/index.njk index b766d44..a5a4eac 100644 --- a/index.njk +++ b/index.njk @@ -22,7 +22,7 @@ description: Welcome to my website! I write about tech, politics, food, and hobb
  • {{ post.data.title }}

    - + {% if post.data.description %}

    {{ post.data.description }}

    {% endif %} @@ -54,6 +54,7 @@ description: Welcome to my website! I write about tech, politics, food, and hobb
  • {{ recipe.data.newest.data.title }}

    + {% if recipe.data.newest.data.description %}

    {{ recipe.data.newest.data.description }}

    {% endif %} diff --git a/posts-index.njk b/posts-index.njk index abb3d19..e64084e 100644 --- a/posts-index.njk +++ b/posts-index.njk @@ -13,7 +13,7 @@ permalink: /posts/
  • {{ post.data.title }}

    - + {% if post.data.description %}

    {{ post.data.description }}

    {% endif %} diff --git a/recipes-index.njk b/recipes-index.njk index cea2fc4..00d3291 100644 --- a/recipes-index.njk +++ b/recipes-index.njk @@ -21,6 +21,7 @@ permalink: /recipes/
  • {{ recipeData.newest.data.title }}

    + {% if recipeData.newest.data.description %}

    {{ recipeData.newest.data.description }}

    {% endif %} diff --git a/recipes/recipes.11tydata.js b/recipes/recipes.11tydata.js index 9c6a9d2..d9a6e3a 100644 --- a/recipes/recipes.11tydata.js +++ b/recipes/recipes.11tydata.js @@ -1,6 +1,7 @@ const fs = require('fs') const path = require("path"); const { execSync } = require("child_process"); +const { DateTime } = require("luxon"); const getSlugFromPath = (filePath) => { // Normalize the path - remove leading ./ if present @@ -62,6 +63,21 @@ const getFileCreatedTime = (filePath) => { } } +const getFileCreatedDateTime = (filePath) => { + const gitTime = getGitCreatedTime(filePath); + if (gitTime) { + return DateTime.fromMillis(gitTime, { zone: 'utc' }); + } + + try { + const stats = fs.statSync(filePath); + const time = stats.birthtime ?? stats.mtime; + return DateTime.fromJSDate(time, { zone: 'utc' }); + } catch (e) { + return DateTime.utc(); + } +} + const getVersion = (filePath) => { const dirName = path.dirname(filePath) @@ -145,6 +161,9 @@ module.exports = { isDraft: (data) => { return data.draft === true; }, + createdAt: (data) => { + return getFileCreatedDateTime(data.page.inputPath); + }, permalink: (data) => { const slug = getSlugFromPath(data.page.inputPath); const version = getVersion(data.page.inputPath); diff --git a/tags.njk b/tags.njk index fad82f2..803627f 100644 --- a/tags.njk +++ b/tags.njk @@ -19,7 +19,7 @@ layout: base.njk
  • {{ post.data.title }}

    - + {% if post.data.description %}

    {{ post.data.description }}

    {% endif %} @@ -36,6 +36,7 @@ layout: base.njk
  • {{ recipe.data.title }}

    + {% if recipe.data.description %}

    {{ recipe.data.description }}

    {% endif %} From 2f5bf48b42f464bb572ffa0f245dfde319c5565b Mon Sep 17 00:00:00 2001 From: Leyla Becker Date: Thu, 19 Feb 2026 17:37:55 -0600 Subject: [PATCH 2/2] feat: added tags to post --- eleventy.config.js | 2 +- posts/remove-tracking-params-from-links.md | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/eleventy.config.js b/eleventy.config.js index 969de5b..a9ac6bc 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -58,7 +58,7 @@ const isReleased = (post) => { } const markdownItHashtag = (md) => { - const hashtagRegex = /^#([a-zA-Z][a-zA-Z0-9_\\\\/]*)(?![a-zA-Z0-9_-])/; + const hashtagRegex = /^#([a-zA-Z][a-zA-Z0-9_\\\\/\-]*)(?![a-zA-Z0-9_-])/; const HASH_CODE = '#'.charCodeAt(0); const SPACE_CODE = ' '.charCodeAt(0); diff --git a/posts/remove-tracking-params-from-links.md b/posts/remove-tracking-params-from-links.md index d1246a1..6dad539 100644 --- a/posts/remove-tracking-params-from-links.md +++ b/posts/remove-tracking-params-from-links.md @@ -920,4 +920,6 @@ You can also use web tools that you can give a URL and it will clean it for you:
    - \ No newline at end of file + + +#privacy #tracking #surveillance #digital-rights #activism #data-collection #security \ No newline at end of file