How I made this blog
04/21/2026
Hello world!
I spun up this blog to document my work.
The first thing I'll write about is the blog itself.
I made this blog using HTML/CSS for the frontend and PHP for the backend. The code is as simple as possible, at least by my standards.
The homepage (/index.php)
Let's discuss the homepage of the website.
The index page of my website
The page is a simple static HTML file (with just happens to end in .php). No PHP here! You can view the source markup on your (desktop) browser by visiting the page, right clicking, and selecting "View Source".
The blog structure (/blog/)
We need to talk about the file structure.
The file structure of the /blog/ directory.
For each blog post, there is a folder in /blog/res/. For example, this is the first blog post, so it uses the '0' folder.
Each blog post's folder contains a 'meta.txt', containing metadata about the blog post.
How I made this blog
04/21/2026
I like PHP, tight security, and long walks on the beach.
The 'meta.txt' for this blog post, at /blog/res/0/meta.txt
Each blog post's folder also contains
// Security
if (!isset($_GET['id']) || !is_string($_GET['id'])) {
echo "Quit it!";
die();
}
$postid = $_GET['id'];
if (filter_var($postid, FILTER_VALIDATE_INT) === false || !is_dir("res/" . $postid)) {
echo "Quit it!";
die();
}
