I finally "finished" something I have wanted to do for a very long
time - made a static site generator using tiddlywiki to generate my
blog.
All of this is obviously still very much a work in progress but I think it is done enough to be useful to myself and others.
The
code is on
[github](
https://github.com/digitalap3/tiddlywikistaticsitegen). There
is a static file tiddlywiki there as well so you can quickly download
that and see what it looks like without running any code.
Basically
it makes use of TW's amazing templating powers so there is room for
changing the structure whenever you desire. I run everything through
Docker but obviously you can take the code and do what you like.
The basic workflow is:
# create a post with the tag 'draft'. This will be the displayed title of the post
# open the `Create New Post` tiddler.
# follow the instructions. The first field is the uri of the post.
It is recommended to use all lower case and hyphens. NO SPACES. I would
avoid special characters but apostrophes seemed to work fine. This will
be the title of the final draft that is to be rendered.
# run build script. this moves images out of the tiddler directory and renders all files with appropriate fields and tags.
# run webserver and check changes in new tab
# repeat until you have desired outcomes.
# copy files to root directory of production site
There are slightly more detailed instructions in the readme of the github repo. I will also write more detailed blog posts.
The semi finished product is at
https://blog.digitalap3.comI
am sure there is lots that I have overlooked and far easier ways to do a
lot of the things done in the tiddlers so I appreciate any suggestions.
I really am enjoying this little project. Tiddlywiki is just mind-blowing.