@@ -1,6 +1,10 @@
11#!/usr/bin/env bash
22
3−# Use this script to automate building the website. You'll need a fresh copy of the repository and a fresh fakezod booted with the static-site-dev branch of Arvo. The site is built in two steps because Urbit typically runs out of memory before finishing a full build. One fakezod is usually good for only a single build.
3+# Use this script to automate building the website. You'll need a fresh copy of
4+# the repository and a fresh fakezod booted with the static-site-dev branch of
5+# Arvo. The site is built in two steps because Urbit typically runs out of
6+# memory before finishing a full build. One fakezod is usually good for only a
7+# single build.
48
59# Strip trailing slashes on input parameters
610
@@ -36,7 +40,7 @@ read -n1 -s -r -p $'Boot your fake ~zod and run |mount %, then press any key to
3640dist="dist-$(date -u '+%Y.%-m.%-d...%H.%M.%S')"
3741mkdir $dist
3842
39−# Render Posts
43+# Second render with |static in urbit (posts)
4044
4145copy_static_site $site $ship
4246rm -rf $ship/home/web/docs
@@ -47,13 +51,13 @@ read -n1 -s -r -p $'Wait for sync, then run |static in your urbit, wait for it t
4751echo -e "Copying posts from $site to $ship"
4852cp -r $ship/.urb/put/web/* $dist
4953
50−# Render docs
54+# First render with |static in urbit (docs)
5155
5256copy_static_site $site $ship
5357rm -rf $ship/home/web/posts
5458read -n1 -s -r -p $'Wait for sync, then run |static in your urbit again, wait for it to finish, then press any key to continue\n'
5559
56−# Copy results of second render (docs) to distj folder
60+# Copy results of second render (docs) to dist folder
5761
5862cp -rn $ship/.urb/put/web/* $dist # cp -n prevents overwriting exist folders
5963
@@ -63,7 +67,7 @@ rm -rf $dist/posts/update
6367rm -rf $dist/index
6468rm -rf $dist/js/*
6569
66−# Copy JavaScript
70+# Copy js directory
6771
6872cp -r $site/static-site/js $dist
6973