t.t.t is a lightweight, database-free blog engine that renders a folder of Markdown files as blog posts.
Make sure Composer is installed and available in your $PATH
.
composer install # Install dependencies
php -S localhost:9000 -t public # Start the server
Set an environment variable $PATH_TO_NOTES
to the folder containing your blog posts.
Using Dockerfile:
# Build the Docker image
docker build -t ttt .
# Run the container
docker run -p 80:80 --rm --name ttt-demo \
-v $PATH_TO_NOTES:/var/www/html/public/content:ro ttt
Using Docker Compose:
docker-compose up
# Start the cluster
minikube start
# Point Docker CLI to Minikube’s Docker daemon
eval $(minikube docker-env)
# Build the image
docker build -t ttt .
# Apply Kubernetes manifests
kubectl apply -f kubernetes-manifest.yml
# Access the app
minikube service ttt-demo-service
-
To publish a post: Upload your
.txt
or.md
file topublic/content/
. -
To categorize posts: Create subdirectories under
public/content/
and place files inside. Nested directories are supported. -
To change the favicon: Replace the following files:
android-chrome-192x192.png android-chrome-512x512.png apple-touch-icon.png favicon-16x16.png favicon-32x32.png favicon.ico site.webmanifest
-
When should I use this? When you want to quickly publish a blog from a folder of
.txt
or.md
files with minimal setup. -
Why the name “t.t.t”? Originally short for
the.tslimi.tk
, my old blog. You're welcome to interpret it however you like now. -
Why PHP? Back in the day of cPanel-based free hosting, PHP was often the only server-side language supported — so, PHP it was.
Run PHP-CS-Fixer before committing:
php-cs-fixer fix
This project was first built when I was in middle school. In the Dec 2020 revamp, the following changes were made:
- Switched to using CDNs and Composer for dependencies. (No, it had not dependency manager back then.)
- Removed the “quick access” list — use your favorite search engine instead.
- Removed
_intro.txt
support for rendering simplicity. - Dropped the custom caching logic to reduce complexity.
- Replaced hand-rolled CSS with mvp.css for cleaner HTML and modern styling.
- Adopted a full favicon set generated via favicon.io.
On Apr 21, 2025, I had ChatGPT rewrite this whole README file.
t.t.t is written with ~200 lines of PHP with just 4 dependencies. With page templates totaling ~130 lines of Twig and CSS shamelessly delegated to mvp.css, t.t.t is less than 400 lines of code in total.
Language | files | blank | comment | code |
---|---|---|---|---|
PHP | 4 | 28 | 24 | 213 |
Twig | 3 | 1 | 0 | 127 |
Markdown | 1 | 48 | 0 | 102 |
YAML | 5 | 4 | 4 | 95 |
XML | 1 | 1 | 0 | 25** |
JSON | 2 | 0 | 0 | 24 |
Dockerfile | 1 | 3 | 0 | 15 |
Text | 1 | 4 | 0 | 5 |
Properties | 1 | 3 | 7 | 2 |
-------- | -------- | -------- | -------- | -------- |
SUM: | 19 | 92 | 35 | 608 |
Licensed under GPL-3.0. See LICENSE
for details.