Felenov Index Computer Profiles Projects Opinions

How this fucking site works

How I built a manageable and fast site without a CMS - I made my own.

Architecture

There is none. The site is static. No JS is used, because JS is cancer.

The webserver does not care what the client is, it could be a fucking tamogochi or a flip phone, it would probably work just fine.

Best practices

Non blocking resources

Anything that slows down the first render is simply discarded. It's not needed here. The fonts have font-display: fallback; set so that the browser starts to render the text as soon as it gets the HTML.

Images

All the images on the site are small, and their size is defined in the HTML, so unnecessary re-draws are avoided. The background tile image's background is also the background in the CSS. If it doesn't load - it will look about the same, except without the cool grid. PNG is used because transparency and because it's small.

CSS

Written by hand and trimmed to the bare minimum. Any unused CSS is removed before it gets uploaded to the server. Pro gamer tip: have cloudflare optimizations on, it's not an excuse for laziness, but you get street cred.

No JS

The site is static. I only put text in here. I don't need half a gigabyte of JS trash.

Self hosting

I don't import shit, ever. Everything you see comes from my webserver, I control it and I get to say what is and what is not loaded, which in my case is the bare minimum.

I don't do the dynamic shit or any of the PHP nonsense, it's just files that get served.

The webserver does not care what the client is, it could be a fucking tamogochi or a flip phone, it would probably work just fine.

Content management

I write all my essays using a private MediaWiki instance, then export and format them to get the HTML files. I get all the organization done for me and I don't have to deal with a CMS.

Management

I only need three tools to manage the site: Notepad++, WinSCP and PuTTY. No IDE or nonsense. I write most of the HTML and templates by hand, then upload them to the server. Anything that I export from MediaWiki is simply uploaded as a HTML file to the relevant directory. If I need to re-write a large number of pages I use something called sed. It's been around ages, writing regex for it is cancer but it's fast and it works, which is important. In some cases I have just logged into the box over ssh and edited what's there directly.

Summary

Static site = good - Look at what Tim Berners-Lee did.

Last edited on 2024-11-14 by Felenov