Oh Thank Fuck I Can Use Layouts Now
03 Apr 2025
After a lot of digging and pulling my hair out, it works! I can actually use jekyll’s built in posts feature even if my blog is not in the root folder of my site! We are SO back!
What does that even mean? Well from my (limited) knowledge, when you first build a site with jekyll, it starts off as a simple blog. This blog uses a configuration file in yaml format to sort everything. You can have set layouts, posts that are immediately indexed, have certain variables that can be injected into your site, yadda yadda, blah blah blah. To be quite honest I have no idea what any of this means. Only that with these files, your site could work right out of the box with minimal to no tweaking.
It’s great! Super useful for people just starting out with making a website! But I don’t need these. I code using HTML and CSS style sheets, not markdown and layouts. However, I found coding a blog by hand to be fucking tedious.
Sure, I could have kept doing what I was doing and manually style and code a list of links that go to other blog pages. And eventually I’d figure out a way to keep them organzied. Maybe I could have figured out how to code a script that would have updated a list of recent entries automatically. But I’m too much of a novice for that and it makes my brain hurt. And there was no way I was going back to the godforsaken platform that is Wordpress. Fortunately, I remembered that ‘oh yeah…jekyll itself starts as a blog. Why not just Frankestein a working blog out of that?’
At first, I thought I could just take all the root files of that blog and shove it in a subfolder and it would work. After all, when I code my site I do it by hand. It doesn’t need the configuration yaml file. So it shouldn’t fuck up anything, right? Wrong.
Unfortunately, it did not work. In fact, it would just return a screwed up 404 page.
For a while, I just kinda kept messing around with the code. I would search through stack overflow for answers (big waste of time) and kept typing into google variations of “how to build jekyll blog in subdirectory please help me.”
Eventually, I found this page and felt like an idiot when I saw how simple the process was. I just had to clear out the yaml file and make my own themes from scratch (which I would have wanted anyways.) Now I can just have a set layout and type all my page content in markdown. It’s a lot faster and jekyll automatically updates a list of my recent entries for me!
And so, my new (?) blog was born!
Will this make me wanna actually use it more? Maybe! It definitely does feel better just using markdown to write straight text instead of constantly worrying about styles and paragraph tags. Sorting this all out has been in the back of my mind for a while so it’s nice seeing that it works!
Eventually, I’ll add a tagging system for these posts. I don’t really see the point when there’s only like…three blog entries here. So that can wait.