Announcing A Static Site Generator

134 views
Skip to first unread message

Donald Coates

unread,
Sep 10, 2020, 8:16:09 PM9/10/20
to TiddlyWiki

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.com

I 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.

Charlie Veniot

unread,
Sep 10, 2020, 11:49:10 PM9/10/20
to TiddlyWiki
That is a right beauty of a blog and a really wonderful TiddlyWiki use case.  Bravo!

Donald Coates

unread,
Sep 11, 2020, 6:26:07 AM9/11/20
to TiddlyWiki
Thank you so much.  Now to keep at it!!
Reply all
Reply to author
Forward
0 new messages