Dark's Wiki
Home
Posts
About
Created: 01/01/1970, 00:00:00 UTCModified: 02/12/2025, 23:37:34 UTC

NextJS and This Website

Welcome!

This is my first post here. It's being written very early while the site is still in development. I will go through both some of the technical aspects of making this site, as well as why I am making this site and its purpose.

This initital post will primarily serve as a test to find basic features that I need.

Why?

For a long time, I've been intending to make a place where I can record my experiences and knowledge on certain topics. For the most part, I've been using BlueSky and X (formerly Twitter) for this. However, those mediums are fragmented and not good for explaining more nuanced topics. Anything longer than two tweets/posts/skeets often gets overlooked, especially if it's all text.

However, with a custom website like this, it is more of a "sit down and read" type of thing. I feel like it'd be easier to explore topics through this medium. This is helped by the fact that, because I'm using NextJS and technically writing this from scratch, I can define whatever elements and components I want to make it more easily digestable.

This also will likely include a tagging system to help find information, as well as maybe even a graphical interface to surf posts by relevancy (like a literal visual web of sorts). The original "Web 3.0" (a.k.a: Semantic Web) talks about the content itself being machine-readable.

Obviously, ChatGPT is starting to get close to that these days, but my perspective of "Web 3.0" in its pure essense: Making the content itself searchable and referenced. That's why this website is a "wiki", or as I want to call it, a "bliki" (Blog and Wiki combined). It will have internal links (like Wikipedia) to other pages and try to provide as much context as possible.

The goal here is that, if someone wants to learn how to do something, I can at least provide them my perspective on it in the quickest way possible. So while some posts may be more blog-oriented like this one, other posts may be much more lean and formatted to just share information.

I will also say: This website is targeted towards desktop users. I may try to make some mobile accomodations (at least for responsiveness), but I am primarily worried about recording information in a low-friction way for myself.

Technical Bits

I am learning that, because of the new SSR-style of making webapps now, I can actually include a significant amount of local processing into each page, which can include underlying systems to categorize and sort my posts. This process is great because I'm using "static" builds (all generated before the website is actually built and served). It doesn't require me to setup a DB or anything.

So for example, it is entirely feasible to create a <RecentPosts/> component to place on the main page. Within this component, I can utilize my existing GetPosts() helper function and use metadata (or "Created Date" through fs?) to get the top 6 recent posts.

But on the flipside, to get highlight.js to work alongside my inline code blocks... requires this monstrosity:

code: ({ children, className }) => {
  if (!className?.startsWith("hljs")) {
    return <code className="bg-black px-1 rounded-sm text-green-500">{children}</code>
  } else {
    return <code className={"px-6! " + className}>{children}</code>
  }
},

I'm also finding tremendous difficulty trying to even modify the code block itself. It's just that the resources for all this stuff is not clear, and I don't really feel like becoming a senior engineer specifically for mdx and hightlight.js interaction.

The Future

Since this is just the beginning, you can expect there to be a lot of changes to this site over time.

I will be adding many new features as needed and will use this as my way to vent things I learn or develop. I want it to be a place of mostly knowledge, but also a recollection of my experiences.

Hope you enjoy!