---
description: What I've been up to (at the time of writing)
date: 2024-09-16
modified: 2025-05-23
blurb: <p>Invalid DateTime. ha, got you.</p>
avatar: /assets/img/art/sundae_glistening.png
---

## {{page.fileSlug}}

<time datetime="{{date|ISO}}">Published: {{date|readable}}</time>
{%if modified%}
<time datetime="{{modified|ISO}}">Last modified: {{modified|readable}}</time>
{%endif%}

<section class="post-warning">

WARNING: BORING NERD TOPIC AHOY

</section>

I had mentioned on my Neocities profile that I would look into re-writing my website fairly soon right after pushing an update out. Took a bit longer than I would've liked honestly, but it's here!

Actually, it had been mostly finished for a while (since July 1st), but I hit a couple of roadblocks (mainly date conversion) that demoralized me from working more on it at the time, as well as some lifestyle changes, like spending less time on the PC and exercising often.

**The most notable things about my site re-write off the top of my head are:**

- converting page elements into `.json` data tables
- rebasing large parts of the page styling
- a larger emphasis on accessibility

### I have <s>no</s> some idea what I'm doing

For starters, porting a website (at least one that's paw-written by yours truly) to a static site generator like {{"Eleventy"|link:"https://11ty.dev/"}} was definitely something, having only dabbled with editing `.html` and `.css` files without hosting a local server.

Initially I went looking around for a base (as to not start from complete scratch) to use and found {{"Smol 11ty Starter by 5t3ph"|link:"https://github.com/5t3ph/smol-11ty-starter"}} and set it up.

I was **very eager** to start working on it, and because I decided to do so late at night, I didn't consult any documentation and thus felt like it would be impossible to learn {{"Nunjucks"|link:"https://mozilla.github.io/nunjucks/"}} (one of the {{"templating languages"|link:"https://www.11ty.dev/docs/languages/"}} used in Eleventy) got upset, settled down and slept.

### You're telling me that Java scripted this?

I still don't understand JavaScript that well, got stumped on a couple of things, and as a result I took some time off working on the re-write.

Regardless, I had ported over the base layout and most pages, which would be around 90% of the work done within the first couple of days. The last 10% that was left being: having to tackle date conversion with {{"Luxon"|link:"https://github.com/moment/luxon"}}, setting custom filters for Eleventy to use them and forgetting to port a few page elements to `.json` data tables.

Currently, my filters are handled really shittily, but they work whenever I build my site.

Here's how I currently have my filters set up for dates in my `.eleventy.js` file, if you also happen to struggle with this:

```js
const { DateTime } = require("luxon");

module.exports = function (eleventyConfig) {
	eleventyConfig.addFilter("postDate", (dateObj) => {
		return DateTime.fromJSDate(dateObj, { zone: "utc" }).toFormat("yyyy-MM-dd");
	});
	eleventyConfig.addFilter("galleryDate", (dateObj) => {
		return DateTime.fromISO(dateObj, { zone: "utc" }).toLocaleString(
			DateTime.DATE_FULL
		);
	});
	eleventyConfig.addFilter("readableDate", (dateObj) => {
		return DateTime.fromJSDate(dateObj, { zone: "utc" }).toLocaleString(
			DateTime.DATE_FULL
		);
	});
};
```

Before you ask: No, I couldn't condense it into two filters, I tried. I'm far too stupid.

...For some unknown reason (to me) I don't know what causes the dates to get jumbled up whenever I used `postDate` for dates on my artworks, but I had to make a seperate filter that would read it as an ISO date. Vice versa with blog post dates. Genuinely clueless.

### { % endfor % }

Despite my struggles, I think Eleventy is a great piece of software, it's just that I'm not knowledgeable enough to leverage its strengths to the fullest.

The fault point here is not even Eleventy itself, but just a popular JavaScript library for dealing with time.
