Compare commits

..

No commits in common. "2f5bf48b42f464bb572ffa0f245dfde319c5565b" and "9a80850230d0783f16886ac4b1b35b6483796f79" have entirely different histories.

7 changed files with 5 additions and 29 deletions

View file

@ -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);

View file

@ -22,7 +22,7 @@ description: Welcome to my website! I write about tech, politics, food, and hobb
<li>
<a href="{{ post.url }}" class="post-card">
<h2>{{ post.data.title }}</h2>
<time class="localizable-time" datetime="{{ post.data.createdAt | isoDateTime }}">{{ post.data.createdAt | dateTimeFormat }}</time>
<time datetime="{{ post.data.createdAt | dateTimeFormat }}">{{ post.data.createdAt | dateTimeFormat }}</time>
{% if post.data.description %}
<p>{{ post.data.description }}</p>
{% endif %}
@ -54,7 +54,6 @@ description: Welcome to my website! I write about tech, politics, food, and hobb
<li>
<a href="/recipe/{{ recipe.slug }}/" class="post-card">
<h2>{{ recipe.data.newest.data.title }}</h2>
<time class="localizable-time" datetime="{{ recipe.data.newest.data.createdAt | isoDateTime }}">{{ recipe.data.newest.data.createdAt | dateTimeFormat }}</time>
{% if recipe.data.newest.data.description %}
<p>{{ recipe.data.newest.data.description }}</p>
{% endif %}

View file

@ -13,7 +13,7 @@ permalink: /posts/
<li>
<a href="{{ post.url }}" class="post-card">
<h2>{{ post.data.title }}</h2>
<time class="localizable-time" datetime="{{ post.data.createdAt | isoDateTime }}">{{ post.data.createdAt | dateTimeFormat }}</time>
<time datetime="{{ post.data.createdAt | dateTimeFormat }}">{{ post.data.createdAt | dateTimeFormat }}</time>
{% if post.data.description %}
<p>{{ post.data.description }}</p>
{% endif %}

View file

@ -920,6 +920,4 @@ You can also use web tools that you can give a URL and it will clean it for you:
</div>
</a>
</div>
</div>
#privacy #tracking #surveillance #digital-rights #activism #data-collection #security
</div>

View file

@ -21,7 +21,6 @@ permalink: /recipes/
<li>
<a href="/recipe/{{ slug }}/" class="post-card">
<h2>{{ recipeData.newest.data.title }}</h2>
<time class="localizable-time" datetime="{{ recipeData.newest.data.createdAt | isoDateTime }}">{{ recipeData.newest.data.createdAt | dateTimeFormat }}</time>
{% if recipeData.newest.data.description %}
<p>{{ recipeData.newest.data.description }}</p>
{% endif %}

View file

@ -1,7 +1,6 @@
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
@ -63,21 +62,6 @@ 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)
@ -161,9 +145,6 @@ 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);

View file

@ -19,7 +19,7 @@ layout: base.njk
<li>
<a href="{{ post.url }}" class="post-card">
<h2>{{ post.data.title }}</h2>
<time class="localizable-time" datetime="{{ post.data.createdAt | isoDateTime }}">{{ post.data.createdAt | dateTimeFormat }}</time>
<time datetime="{{ post.date | dateTimeFormat }}">{{ post.date | dateTimeFormat }}</time>
{% if post.data.description %}
<p>{{ post.data.description }}</p>
{% endif %}
@ -36,7 +36,6 @@ layout: base.njk
<li>
<a href="/recipe/{{ recipe.data.recipeSlug }}/" class="post-card">
<h2>{{ recipe.data.title }}</h2>
<time class="localizable-time" datetime="{{ recipe.data.createdAt | isoDateTime }}">{{ recipe.data.createdAt | dateTimeFormat }}</time>
{% if recipe.data.description %}
<p>{{ recipe.data.description }}</p>
{% endif %}