Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions check_dates.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
const fs = require('fs');
const path = require('path');
const matter = require('gray-matter');

function getFiles(dir) {
const dirents = fs.readdirSync(dir, { withFileTypes: true });
const files = dirents.map((dirent) => {
const res = path.resolve(dir, dirent.name);
return dirent.isDirectory() ? getFiles(res) : res;
});
return Array.prototype.concat(...files);
}

const postsDir = path.join(process.cwd(), 'src/posts');
const files = getFiles(postsDir).filter(f => f.endsWith('.md'));

console.log(`Checking ${files.length} files...`);

let errors = 0;
files.forEach(file => {
const content = fs.readFileSync(file, 'utf8');
try {
const parsed = matter(content);
const date = parsed.data.date;
if (date) {
const d = new Date(date);
if (isNaN(d.getTime())) {
console.error(`Invalid date in ${file}: ${date}`);
errors++;
}
}
} catch (e) {
console.error(`Error parsing ${file}: ${e.message}`);
errors++;
}
});

if (errors === 0) {
console.log("All dates valid.");
} else {
console.log(`Found ${errors} errors.`);
process.exit(1);
}
54 changes: 19 additions & 35 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"not dead"
],
"dependencies": {
"@11tyrocks/eleventy-plugin-sass-lightningcss": "^1.0.1"
"@11tyrocks/eleventy-plugin-sass-lightningcss": "^1.0.1",
"gray-matter": "^4.0.3"
}
}
20 changes: 20 additions & 0 deletions src/pages/onephatdj.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: "One Phat DJ Podcast (2005-2009)"
layout: "page"
linkText: "OnePhatDJ"
templateEngineOverride: md, njk
---

## The original season of the podcast, hosted by the founder One Phat DJ.
Expand All @@ -19,3 +20,22 @@ It was submitted to the iTunes Podcast Directory and the journey started.
Over the following 4 years, One Phat DJ continued to share regular mixes every month, growing a loyal following from around the globe and establishing his sound as a "taste-maker" in the house music industry with fantastic support from featured artists, vocalists and labels but, most importantly, the listeners.

Listen back to all 51 mixes from the archives.

<ul class="tdbc-column-container">
{%- set posts = collections.posts | reverse -%}
{%- for post in posts -%}
{%- if 'onephatdj' in (post.data.categories or []) -%}
<li class="tdbc-card">
<div class="tdbc-card__content">
<p class="tdbc-card__date">
<time>{{ post.date.toUTCString().substring(5,17) }}</time>
</p>
<h3>
<a href="{{ post.url }}" class="tdbc-card__title">{{ post.data.title }}</a>
</h3>
<img src="/img/cover-images/{{ post.data.coverImage }}"/>
</div>
</li>
{%- endif -%}
{%- endfor -%}
</ul>
2 changes: 1 addition & 1 deletion src/posts/2025/hf6.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "HF309 with Andi King"
date: "Fri, 06 Feb 2026 05:00:00 -0000"
date: "2026-02-06T05:00:00.000Z"
categories:
- "shows"
author: "DJ"
Expand Down