My Zola Process
I’ve switched static site generators but I thought this may be useful for someone using Hugo like I did. This was my process when I did still use Hugo.
It’s pretty simple to make a new post or page now.
I create the markdown file.
Then I run zola --root ~/zola_sites/deth.org/ serve
on my local machine.
Building site... Checking all internal links with anchors. > Successfully checked 127 internal link(s) with anchors. -> Creating 2369 pages (0 orphan) and 42 sections Done in 19.9s. Listening for changes in /usr/home/carl/zola_sites/deth.org/{config.toml,content,sass,static,templates} Press Ctrl+C to stop Web server is available at http://127.0.0.1:1111
That started the local server so I can go to to localhost:1111 to test it and tweak anything I need to tweak. This method is more intuitive than typing out the HTML tags or using includes. It also takes care of the linking and menu which is the easiest part to fuck up when doing the HTML all by hand.
Once I’m happy with it it’s as simple as
zola --root ~/zola_sites/deth.org/ build && rsync -ahcXOPvr --out-format="%n" --stats --delete
to sync it. Shit it’s even in my command history now I don’t even have to type it. It’s taking between 20 and 30 seconds to rebuild now but I have a lot of pages that use the image processing short code. That seems to add about ten seconds. The weather stuff takes some time too but that’s still so much better than hand writing the HTML which can be very monotonous.
Building site... Checking all internal links with anchors. > Successfully checked 127 internal link(s) with anchors. -> Creating 2369 pages (0 orphan) and 42 sections Done in 20.4s. sending incremental file list wiki/zola/my-zola-process/index.html 9.27K 100% 8.17MB/s 0:00:00 (xfr#1, ir-chk=1171/7364) Number of files: 7,691 (reg: 4,906, dir: 2,785) Number of created files: 0 Number of deleted files: 0 Number of regular files transferred: 1 Total file size: 3.73G bytes Total transferred file size: 9.27K bytes Literal data: 700 bytes Matched data: 8.57K bytes File list size: 112.09K File list generation time: 0.001 seconds File list transfer time: 0.000 seconds Total bytes sent: 431.88K Total bytes received: 12.04K sent 431.88K bytes received 12.04K bytes 59.19K bytes/sec total size is 3.73G speedup is 8,401.50