MakeStaticSite’s workflow comprises a number of phases, each phase having one or more tasks, as indicated in the following visualisation, arranged in temporal ordering. The labelling more or less reflects the descriptions given previously.
Sample Terminal Output
The following is pretty much a complete copy of the terminal output (STDOUT and STDERR) generated when building and deploying makestaticsite.sh (constants.sh has output_level=quiet). More granular information is written to the log file ( log_level=normal). To facilitate the illustration, we split the output into the respective phases.
Phase 0: Initialisation
paul@linux-pt:~/scripts/makestaticsite$ ./makestaticsite.sh -i mssweb
Welcome to MakeStaticSite version 0.22
Starting at phase 0: Initialisation.
Ending at phase 9: Deploy.
Reading custom configuration data from config/mssweb.cfg ... Done.
Phase 1: Prep the CMS
Starting the static site generation ...
Will capture snapshot from https://makestaticsite.sh using wget.
WP-CLI is installed and will be run locally
Found WordPress site at /var/webs/mss.ptlocal
Checking WordPress settings to remove query strings and shortlinks
Updating Perform options ... Done.
It looks like there is already a search page. Assume that it contains the shortcode [static_search], so we won't update it.
Phase 2: Generate static site
Reading list of additional URLs to crawl from config/input_mss_localweb.txt.
Running Wget with options: --mirror --convert-links --adjust-extension --page-requisites -U Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) -X/wp-json -R wp-admin,xmlrpc*,index.html?*,*login*,*logout* --no-check-certificate --directory-prefix mssweb20230214_122515 --input-file=/home/paul/scripts/makestaticsite/tmp/wget_inputs_main.txt -a /home/paul/scripts/makestaticsite/log/makestaticsite.log
Creating a mirror of https://makestaticsite.sh in /home/paul/scripts/makestaticsite/mirror/mssweb20230214_122515/mss.localweb ... Done.
WARNING: Wget ERROR code 8, i.e. the Web server gave an error on retrieving at least one file, probably HTTP 404 (file not found - possibly specified in the input file). Less likely is a 500 (internal server error), which in the case of a CMS might be due to a plugin or module.
It should be safe to proceed, but you may like to rerun and/or review the output by referring to the log file, which has more detail.
Continuing (to run unattended).
Phase 3: Augment
Searching for additional URLs to retrieve with Wget (working in /home/paul/scripts/makestaticsite/mirror/mssweb20230214_122515/mss.localweb) ... Done.
Phase 4: Refine
Carrying out post-Wget processing in /home/paul/scripts/makestaticsite/mirror/mssweb20230214_122515/mss.localweb ... Done.
Replacing remaining occurrences of mss.localweb with makestaticsite.sh ... Done.
Converting feed files and references from index.html to index.xml ... Done.
Updating anchors for makestaticsite.sh from http: to https: ... Done.
Phase 5: Add Extras
Copying additional files from /home/paul/scripts/makestaticsite/extras/mss.localweb/ to the static mirror (for distribution) ... Done.
Phase 6: Optimise
Updating canonical URLs in document headers ... Done.
Running HTML Tidy on html files with options -m -q -indent --indent-spaces 2 --gnu-emacs yes --tidy-mark no ... Done.
Created a sitemap file at /home/paul/scripts/makestaticsite/mirror/mssweb20230214_122515/mss.localweb/sitemap.xml
Phase 7: Use snippets
n/a – not used
Phase 8: Create offline zip
Creating a ZIP archive ...
ZIP archive created.
Phase 9: Deploy
Updating internal anchors to conform with canonical URLs ... Done.
Deploying on Netlify ...
Site already linked to "soft-figolla-77cff1"
Admin url: https://app.netlify.com/sites/soft-figolla-77cff1
To unlink this site, run: netlify unlink
Deploy path: /home/paul/scripts/makestaticsite/mirror/mssweb20230214_122515/mss.localweb
Deploying to main site URL...
- Hashing files...
✔ Finished hashing
- CDN diffing files...
✔ CDN requesting 3 files
- Uploading 3 files
✔ Finished uploading 3 assets
- Waiting for deploy to go live...
✔ Deploy is live!
Logs: https://app.netlify.com/sites/soft-figolla-77cff1/deploys/63eb7dc5dbb9cc20463446eb
Unique Deploy URL: https://63eb7dc5dbb9cc20463446eb--soft-figolla-77cff1.netlify.app
Website URL: https://makestaticsite.sh
Deploying on a remote server using rsync over ssh ...
Sync to remote server
From: /home/paul/scripts/makestaticsite/mirror/mssweb20230214_122515/mss.localweb/
To: ***
Phase 10: Conclude
Completed in 37 seconds.
All done!
A static mirror of https://makestaticsite.sh has been created in /home/paul/scripts/makestaticsite/mirror/mssweb20230214_122515/mss.localweb
The site has been deployed on ptworld.net, for web access at http[s]://makestaticsite.sh.
Thank you for using MakeStaticSite, free software released under the GNU Affero General Public License version 3. The latest version is available from https://makestaticsite.sh/download/makestaticsite_latest.tar.gz.
The deployment message needs some explanation. It has actually been deployed to two services, first Netlify, where its hosted under makestaticsite.sh, and then another server, ptworld.net, which can act as a mirror or, in the rare case of hosting or DNS issues, a fallback (with the relevant changes to domain name settings).