Hi, I made a website. It runs on a few things, including a lot of little scripts , this may change without warning. Here’s how it works now.
I have a DigitalOcean VPS. It’s nice, it’s $5 a month and it’s also far more than I need. It runs my IRC bouncers, bots, some VPN stuff sometimes, and any other online persistent things I need. If you’re a student on GitHub then you get $50 credit with Digital Ocean, which is plenty to get started.
The actual server is run on Nginx. I chose Nginx because my friends use it and I don’t feel like using Apache. You can use Apache, it works pretty well.
Most of my posts are written in Markdown. I like Markdown because it’s easier than HTML but I can also put HTML in if I need to do tricksy things. This post is written in markdown. Sometimes I put custom markers into my Markdown that my page processing scripts will use to divide up the page into blocks. I’ll get to that now.
Once-off/odd pages like the home page are all written directly in HTML, probably based on some template I made at some point. I don’t keep track of this stuff.
Text-editor wise, I use neovim. I usually just connect over ssh using mosh to edit stuff, but if I have a lot of words I’ll use scp. This is because I live an entire continent away from this server and editing with a half second latency gets tiring, even with mosh playing middleman. If you want to yell at me about these choices, my email address is on the homepage.
I’ve hacked some garbage python scripts together using PyPandoc to convert my Markdown to HTML. Pandoc is a great tool that basically does conversion from any document format to any other document format. I use it a lot for writing when I don’t care enough to do something in HTML or LaTeX proper, so I just write it in Markdown and use Pandoc to convert to whatever I need.
The scripts are currently all hardcoded per template and I run them manually when I’m done writing a new thing. They’re smart enough that I could put them on cron, but I don’t really need that at the moment.
Each script runs in the directory it’s in charge of, e.g. /blog or /food. It parses a .ignore file, which tells it which files it shouldn’t convert, e.g. anything matching wip.*md, which allows me to just run it blindly and only convert the right files. Each script has rules on how to split up the markdown, which is then converted to HTML and substituted for a keyword in an HTML template. This is how I get the ingredients/recipe pane working for the recipe stuff.
I’ll upload these scripts to GitHub, along with my posts, at some point. Once this is actually doing something. They’re not particularly special.
This is all in basic CSS and HTML. I have a couple CSS files that can be used in combination to create certain looks. The character glow effect is blatantly stolen from velartrill’s site and uses the drop-shadow effect to work. In fact, a lot of this is blatantly stolen from her. I even say so in the CSS files. It’s a nice site.
I don’t have any. Any that happen in the future will probably be in Flask or Django. I plan never to use PHP on this if I can avoid it, because ever since this went public it keeps getting hit with automated PHP attacks and I don’t trust myself not to screw one of those up.
You may have noticed that this site works over HTTPS. I use the LetsEncrypt certbot to do that for me and it pretty much works. Use HTTPS, it’s good.
No.
So that’s how the site works. It’s pretty simple, because this way I know most of what’s going on.
Thanks for coming to my TED talk.