Reworking my website - Blog 2.0

So time for the blog to be migrated!

Given how few blogposts I have and how few categories I have, I think I'm going to rework it a little. The plan is to load all blog posts and sort them into different arrays and using filtering I'll show different blogposts using CSS. I think this will work fine for what I need.

For up is pulling the data and just displaying all of them. To do this I just copy the portfolio code and base it on that. Pulling the entries looks something like this:

Now I just need to display them. To be able to filter them I am pulling in the category and adding it as a class on the blogpost. This means that I can make CSS that hides posts that the user does not want to show. Hopefully this works correctly in static mode on Netlify.

The DOM will look like this:

Next is to add the category filtering which will work similarly to how the rest is pulled. Each of the categories has a line which then can be toggled. Toggling a category changes the query of the page and based on the query CSS is generated to hide/show blog posts.

I think the blog will have to be done for now. Running out of time for today.