trying to make category searching work

This commit is contained in:
2026-03-21 16:04:00 +00:00
parent 6c62e2208c
commit dd1a0d984d
4 changed files with 104 additions and 5 deletions

View File

@@ -101,4 +101,60 @@ version: 1.1.1
In order for such a service to be viable, I don't want to have to manage it manually. Instead, I can use a webhook to pull the html
repo whenever there is a new commit. This could also be on a timer, but instant gratification is better.
Unfortunately, nothing ever goes to plan when linux is involved.
Unfortunately, nothing ever goes to plan when linux is involved. The first indicator that my system wasn't going to work out was the fact
that when you rebuilt the site, the repo within the public folder was erased. This is nonsense, and I have already opened an issue so
that when it's fixed I have an excuse to remake the whole system.
*** Nginx Tangent
Nginx config is at the same time overly-complex and too basic.
It's like python. It looks easy on the surface, but when you get into it, does things in the most roundabout way possible.
Complaints about python aside, nginx is a nightmare to deal with on a usual basis. This is exactly why there are an infinite number
of management solutions for it, one of which I am literally using to host this site (shoutout nginx proxy manager my love).
Unfortunately not all of these solutions can host files at the raw level like I intend to, so here we are, once again, having
to waste hours figuring out why the css is being denied.
For future reference, the nginx config I'm using is as follows:
@code nginx
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /config/www/public;
index index.html index.htm index.php;
location / {
try_files $uri $uri/ =404;
autoindex on;
autoindex_exact_size off; # Displays file sizes in KB/MB/GB instead of bytes
autoindex_format html; # The standard web view
autoindex_localtime on; # Uses the server's local time for file dates
}
@end
To any experienced web developer, such as not myself, this would look like a war crime. Because it is.
This is 100% succeptible to every form of exploit one can think of. However, because I'm running this through nginx proxy manager,
I don't have to worry about such trivial things as "security" and "ssl". Everything is managed in a different docker container!
Thanks NPM.
*** Git tangent
Earlier, I said I wanted this to be automatic. And currently, it is. So, how?
I host my own shit. That's everything. Including Git.
Gitea is the least complex option that everyone seems to like enough to tolerate. It also has webhooks. And I have n8n. N8n is an
automation engine, that uses flows to achieve what can be done with basic intuition in a systemd service, or an assistant. Sadly, I
have neither the time nor money to hire someone to update git repositories for me, so I guess we're doing it with bullshit.
Gitea has the ability to trigger webhooks on a push event to a repo, and n8n can trigger commands when a webhook is triggered.
This has the side effect of letting me have a repo that, if pushed to, can trigger a webhook that opens firefox on my pc. As you can
tell, I shouldn't have permission to use automation tools. By hooking (no pun intended) n8n into gitea, I can run a command over ssh
every time the repo is pushed to, so the changes are pulled to the server automatically. The only caveat is that you can't minify
the build output, because if you do, any change will rewrite the whole file, which leads to truly insane git diffs. Such is git.
** The Final Result
Everything starts on my local machine. There is a folder in my Documents that contains the repo for the site. This is also set in my nvim
config as a Neorg workspace, so that I can make links between files, if I so wished. When I've written a post, I can build the site
on my local machine, an endeavor that takes a tenth of a second, and commit, with such entertaining messages as "initial" and "changes".
When said commit is pushed to my gitea repo, a webhook is triggered, telling n8n to ssh into server02 and pull the repo into the
www folder in the nginx docker container. Because nginx isn't 50 years old, all files update on the fly, and the new article appears
on the public facing instance.
See? web development is simple.