3.5 KiB
+++ title = "My Tilde Site setup (2023)" date = "2023-01-30" updated = "2023-01-30" [extra] authors = ["Ydreniv"] tags = ["indieweb", "web", "meta"] +++
I’ve finally finalized my Tilde Towm website setup. There’s nothing too fancy, but several bricks to assemble.
The core
The core of this setup is powered by Zola. This is a nice static site generator, which can be run with a single binary. Unlike others, like Jekyll, there is no need to manage a whole Ruby/Python/… environment. I have put a Zola binary in my Tilde home, to use whenever I feel the need.
While typing Zola commands may be okay the first few times, I soon decided to automate things a bit. I’ve settled on using a simple Makefile, as it is quite standard, and easy enough to use.
all: build
build:
yes | ~/zola build -o ~/public_html
It’s very simple, but means I only have to type make
when compiling the
website.
And then, it means I can easily make things more complex.
Indieweb
As part of my efforts to integrate this site to the Indieweb, I wamsel so be
able to send webmentions.
I’ve settled on using Pushl.
It’s a CLI tool which caches it’s previous mentions, meaning it won’t send the
same twice.
So I’ve added a pushl
stage to my Makefile, which is required by the all
stage:
pushl:
. /home/ydreniv/venv-pushl/bin/activate ; pushl -c pushl-cache/ "https://tilde.town/~ydreniv/atom.xml"
This is great, as it means webmentions will be sent automatically, without me having to do any cURL command manully. However, this accentuates an issue. How do I manage my test environment ?
Test environment
At first, when I wanted to test something, I tested it live. It was okay. At most, one person would see a broken site, which would be fixed in the next minutes. Webmentions and feeds however make some things asynchronous. I could mess up a link, and ending up mentioning the wrong page. Or I could make a typo, build things, have the typo included in the feeds, and have a feed reader collect this feed before I fix it. While both are minor issues, it prompted me to setup a better developing environment.
At that point, I still didn’t have put anything on git. So I got a Gitea account, and git everything. This is not strictly needed, but it’s a great way to backup code or static site. This also means I’ll be able to see things like monthly changes.
Then, I created a webspace on my personal server, with sftp access. My workflow would be the following : I would build things on Tilde Town, send the output via sftp to my personal server. Then once I have checked that everything is fine, I would do the previous build+pushl to Tilde Town.
My current Makefile is the following :
all: build pushl
build:
yes | ~/zola build -o ~/public_html
pushl:
. /home/ydreniv/venv-pushl/bin/activate ; pushl -c pushl-cache/ "https://tilde.town/~ydreniv/atom.xml"
preprod:
yes | ~/zola build --base-url https://example.com/ydreniv --drafts
echo "put -r public/* www" > sftp-batch.txt
sftp -b sftp-batch.txt example.com
rm sftp-batch.txt
It’s not perfect, and the path difference (~ydreniv
vs ydreniv
) means that
some links are broken.
Moreover, somehow the test server doesn’t display non-ascii characters well.
And there’s the issue of the sftp transfer as well.
It’s very slow, and probably not optimized.
Yet it’s good enough for me.
I’ll have to improve it further, but that’s enough for now.