A Postmortem
A Postmortem
I finally finished it. I thought it would take one to three hours, but it took three or four times that long. Still, I got it done by myself in the end.
The first thing that took me down was git. I was not familiar with either git or Hexo. hexo deploy can publish the site directly to GitHub, but what was I doing? I just kept pushing things manually. At least that mess forced me to learn some Git basics.
Then, because I kept pushing blindly, I somehow made main disappear. I still do not completely understand what happened there. The branch was probably still main in spirit, but the state of the repo became weird enough that I started trying random things just to get back to where I was. At one point I typed git branch list, accidentally created a branch literally named list, and made the whole thing even funnier and more complicated.
The bigger problem was that what Hexo deploys is not your source files. So the stuff I pulled down did not really match what I had locally, and the same thing happened in the other direction. I ended up using push --force all over the place. Looking back, it is kind of hilarious. At the time, though, it felt awful. By the time I finally understood the situation, the files were already a complete mess.
Then came the next absurd phase. At first the issue was simply that the renderer was missing. That was only the beginning. I installed the rendering plugin, felt great when it worked, and then went on to configure everything else. That was when I made the truly fatal mistake: the url field in config.yml.
The example says https://username.github.io/project. At first I got it completely wrong, then I immediately realized the mistake and corrected it. The problem was that I “corrected” it to https://LLLLLUOTJ.github.io/LLLLLUOTJ.github.io. At first glance that looked perfectly reasonable. The project name was LLLLLUOTJ.github.io, right? So I thought I had it nailed.
And then the page rendering died. Completely.
I checked the browser console and saw Uncaught SyntaxError: Unexpected token '<'. I opened the file it was complaining about. It was a .js file. At the time I did not even stop to think about why it contained HTML tags. I just started searching for that error message everywhere.
Usually I can find an answer to these kinds of problems by searching. I have become weirdly good at digging up solutions lately. But this error was too stupid. I could not find anything, because apparently nobody makes exactly this mistake and then goes online to ask about it.
I was convinced the plugins were the problem, so I followed other people’s setup guides, tweaked packages, and created even more errors. One warning here: do not use fix --force casually. If you ever do, keep a backup first so you can roll things back. That thing really can make a mess. I used it once, things looked fixed for a moment, and then new errors kept appearing after that. At least I learned a bit more about node.js package dependencies. In principle, version conflicts are not supposed to happen that easily, which is also why there are not that many answers online.
Eventually I reinstalled things and ruled the packages out. Then I went back to the browser dev tools and finally noticed that the supposed .js request was actually loading HTML. I scrolled further and realized it was literally loading the page’s original HTML file. That explained everything, but I still could not find a proper answer online.
I asked GPT about it, and it suggested a broken file request path. I compared my request path with another person’s blog and noticed that I had an extra LLLLLUOTJ.github.io in mine. I had seen that before and assumed it was normal, but of course it was not. Since the path was relative, that extra segment broke everything.
I fixed it tonight.
I am exhausted.
