created: 2023-07-12
similar to Hugo and others, zola is a static site generator.
I tried Hugo before, but it is too much. Its quick-start guide tell users to use a theme right from start. I never really understand Hugo because of how it approaches users. It’s not that ones cannot learn about it. Hugo is being used by a many people, including Luke Smith. It’s definitly a good SSG to use, just not my taste.
Then I found Zola, much more minimal and simple. Because of the simplicity I feel easily to learn it and build everything from scratch. I have control over all.
├── config.toml
├── content
│ ├── library
│ └── posts
├── createpost
├── readme.md
├── rsynctoserver
├── static
│ ├── apple-touch-icon.png
│ ├── css
│ ├── favicon.ico
│ └── images
└── templates
├── 404.html
├── base.html
├── index.html
├── page.html
└── section.html
I have 2 scripts here createpost
& rsynctoserver
.
./createpost posts try out zola
. This will make folder posts
if there isn’t any then make a post with date and title info in the folder../rsynctoserver
: This will sync compiled files to my server.#!/bin/bash
# createpost
arguments=("$@")
directory="${arguments[0]}"
timestamp="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
unset "arguments[0]"
title=("${arguments[@]}")
titlep="$(tr ' ' '-' <<<"${arguments[*]}")"
filename="./content/${directory}/${timestamp}_${titlep}.md"
mkdir -p "./content/$directory"
touch "$filename"
cat > "$filename" <<EOF
+++
title = "${title[*]}"
+++
EOF
$EDITOR "$filename"
#!/bin/bash
# rsynctoserver
# -r: recursively
# -t: modification times (skip files have not been modified)
# -v: visual
# -z: compress files
# -P: if uploading large file and breaks, pick up where we left.
rsync -rtvzP ./public/ boss@tienbuigia.online:/var/www/tienbuigia
I’ve been happy with zola so far.
You can find my build, scripts here.