Feature: Site Build
Purpose
The project contains a static-site input directory (site.in/) and a generated static-site output directory (site.out/).
The Site Build feature provides the scripts that convert site.in/ into site.out/ and publish it.
The generated site is a project status and dataset dashboard for the global elevation model dataset. It is deployed at https://labs.bannister.us/projects/model-elevation-earth/ following the homelab publishing conventions.
Requirements
scripts/site-build.shmust generate the static site insite.out/from the input insite.in/.- Each
site.in/*.txtinput file must producesite.out/<name>.html. - Generated output must be identified as generated.
- The script must accept optional input and output directory arguments.
- When no arguments are given, the script must use
site.in/andsite.out/relative to the repository root. - The script must be a POSIX shell script.
- The HTML page structure must live in
site.in/template.html, not in the build script. site.in/template.htmlmust contain the marker line<!-- SITE-CONTENT -->where page content is inserted.- The site must include a summary page (
index.html) and a dashboard page (dashboard.html). - The dashboard page may contain
__TOKEN__placeholders for live state. - Live state comes from a generated model file written by
scripts/site-state-fetch.sh. - The default state file is
dataflow.out/site-state.txt, overridable with aSITE_STATE_FILEenvironment variable. - When the state file is present, the build must substitute its
KEY=valuelines for matching__KEY__placeholders. - When the state file is absent, remaining
__KEY__placeholders must render asunavailable, so the build stays portable. - The site build must not depend on the live system.
scripts/site-deploy.shmust publishsite.out/to~/labs.bannister.us/projects/model-elevation-earth/on the Dreamhost web server using thebannister.usSSH alias.scripts/site-deploy.shmust abort when the site output contains sensitive content: MAC addresses, private LAN IPs, usernames, home paths, or private-key material.
Behavior
- Running the build script recreates
site.out/fromsite.in/. - Re-running the build script overwrites existing output deterministically.
- The summary page renders without any state file.
- Running the deploy script after a build publishes the pages at
https://labs.bannister.us/projects/model-elevation-earth/.
Dependencies
- None.