What’s new on the blog and Super Blog Starter?
It’s been a while!
I can’t believe it’s October! It’s nearly the end of the year, where did the time go? I turn 31 years old this month which is very scary to me. The fact that I’m getting closer to 40 is frightening.
I’ve been super busy with starting a new job as an Application Analyst recently, and I’ve been planning a trip to the USA as I’m attending two weddings. Plus, I’ve been working on my house a little. So it’s been a busy month or so.
So for this short post, I just wanted to highlight some of the improvements I’ve made to the blog and my small project, Super Blog Starter
The blog
So, what’s new on the blog? Package updates and performance improvements.
The packages that are used on this blog have been updated to the latest version. NextJS has been upgraded to 13.5. This version has the following improvements:
- 22% faster local server startup
- 29% faster HMR (Fast Refresh)
- 40% less memory usage
- Optimised Package Imports
- next/image Improvements
- And over 438 bugs patched!
I’ve also been doing some performance improvements on getting posts by a tag. I’ve noticed that in production, the function that gets the posts was very slow. So I decided to make some changes and it seems to be performing better!
For those who are curious, here’s the new function:
export async function getPostsByTag(tag) {
const allPostsData = getSortedPostsData();
const postsWithTag = allPostsData.filter((post) => post.tags.includes(tag));
const results = await Promise.all(postsWithTag.map(async (post) => {
const fullPath = path.join(postsDirectory, `${post.id}.md`);
const fileContents = await fsPromises.readFile(fullPath, 'utf8');
const matterResult = matter(fileContents);
const processedContent = remark().use(html).processSync(matterResult.content);
const contentHtml = processedContent.toString();
return {
id: post.id,
contentHtml,
...matterResult.data,
};
}));
return results;
}
The difference being is that this function is now an asynchronous function.
I’ve been seeing some performance improvements running locally, so hopefully this will improve the performance in production.
I’ve also fixed a weird Safari issue where the desktop view looked strange (why is it always Safari that has issues?)
There are a few other things I’d like to do with the blog as well, which I’ll work on over the next few months.
Super Blog Starter
The current version of the project is v0.0.3 and it features the improvements that I’ve been making to this website (except the improved performance of getting posts by a tag, that’s something I need to include in the next version).
The project is making steady (but slow) progress, so feel free to contribute and make suggestions!
I do have plans for this in the future, including adding some automated tests.
If you do use this starter, let me know! I’m curious to see who is using this.
The rest of the year
As we approach the end of the year, the holiday season begins, I’ll be looking to relax a bit more. I’ll be spending some time writing up my ‘end of the year’ wrap up post as well. I do have many other blog posts that are currently in progress as well, so I might find some time to finish one or two and publish them.
I’m hoping to get a Steam Deck for my birthday, so I might be writing up a few posts about that. I need to play more games as I need to find ways to relax. Plus, since I’ll be travelling a bit more, it’ll be good to bring with me.
Until next time 👋