- PHP 91.2%
- CSS 8.7%
- Dockerfile 0.1%
Tinble
Tinble is a simple, lightweight blog engine that uses Markdown-formatted text files. It started its life as a heavily modified fork of Tiny Blog Engine. Tinble stands for Tiny blog engine.
Tinble is very much old-school. Apart from a tiny bit of JavaScript used for more convenient navigation, the entire application is written in PHP by a clueless but curious human.
Features and functionality
- Lightweight: Only a handful of PHP and CSS files, plus a single optional JavaScript library.
- Straightforward deployment: Copy all the files to the document root of your web server with PHP.
- Syntax highlighting: Using the Rainbow library.
- Dark theme: Available for those who care about it.
- Scheduled article publishing: Articles in the drafts directory are automatically published on the dates specified in the file name prefixes (for example, the 2030年07月18日_first-article.md file in the drafts directory is published automatically on July 18, 2030).
- Pinned articles: You can pin articles to the top by adding pinned anywhere in their file names.
- Simple guestbook: Instead of comments, Tinble comes with an old-school guestbook.
- Search: The search feature can be used to find articles containing the specified search term.
- RSS2 support: Tinble automatically generates RSS feeds.
- i18n support: The application can be easily localized to any language.
- Self-contained: No external dependencies. All required libraries are included.
- Works with simian
Requirements
- A web server with PHP 8.x or higher. Tested with Apache.
- PHP GD extension (for image resizing).
- PHP XML extension (for HTML in Markdown).
Installation
-
Checkout the latest code using Git:
git clone https://codeberg.org/dmpop/tinble.gitAlternatively, download the source code from the project's Codeberg repository, and unpack the downloaded archive.
-
Move all the files in the tinble directory to the document root of your server.
-
Make the content directory writable by the server. For example:
chown www-data:www-data -R /var/www/html/content
Run Tinble in a Container
Perform the following steps on the machine you want to use as a Tinble server.
-
Install Docker.
-
Run the
hostname -Icommand and note the IP address of the machine. -
Create a directory for storing content.
-
Clone the Tinble Git repository using the
git clone https://codeberg.org/dmpop/tinble.gitcommand. -
Switch to the resulting tinble directory, open the config.php file for editing, and replace the default value of the
$BLOG_URLwith the IP address of the machine. -
Build an image using the
docker build -t tinble .command. -
Run a container:
docker run -d --rm -p 8000:8000 --name=tinble -v /path/to/content:/usr/src/tinble/content:rw tinbleReplace /path/to/content with the actual path to the created directory.
-
Point the browser to http://127.0.0.1:8000 (replace 127.0.0.1:8000 with the actual IP address or domain name of the machine running the container).
Deploy Tinble with docker-compose.yml
Using the supplied docker-compose.yml file, you can deploy Tinble on a machine with a domain name assigned to it. This approach automatically enables HTTPS.
- Open the
Caddyfilefor editing. - Replace
<email address>with the email address you want to use with the Let's Encrypt service. - Replace
<domain name>with the domain name assigned to the server. - Save the changes.
- Run the
docker compose -dcommand.
Adding articles
To add an article, create a .md file in the content/articles directory using the following naming rule: yyyy-mm-dd_title.md (for example, 1970年01月01日_this-is-first-article.md).
To insert an image into an article, put the image into the content/articles/img directory and use the following Markdown code:

When uploading an image for use in an article, resize the image and reduce its quality. Alternatively, you can use the included tim.php script (requires the GD library), as follows:

The script resizes the inserted image to the specified width on-the-fly.
Scheduling articles
Place the article you want to publish on a specific date in the content/articles/drafts folder, and use the desired date as the filename prefix. For example, the article named 2030年07月18日_first-article.md will be automatically published on July 18, 2030.
Adding pages
To add a page, create a .md file in the content/pages directory.
License
GNU General Public License version 3