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/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.description }}
{% endif %} @@ -54,6 +54,7 @@ description: Welcome to my website! I write about tech, politics, food, and hobb{{ 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.description }}
{% endif %} 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 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.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.description }}
{% endif %} @@ -36,6 +36,7 @@ layout: base.njk{{ recipe.data.description }}
{% endif %}