This guide walks through the retro RadioStatic demo that ships with the repository. Follow it to generate the sample site locally, explore the output, and adapt the structure for your own projects.
- Node.js 18 or newer (the demo runs entirely on the command line—no extra services required)
npmfor installing dependencies- Optional:
makefor the convenience targets
npm installInstallation is only required the first time you clone the repository (or after updating dependencies).
./build-site.shThe script wraps the generator CLI (static-sitegen/bin/radiostatic.js) and defaults to smoke-test.yaml. It validates the resulting files and prints a short listing from the output directory.
You can pass a different configuration file or choose a custom output directory:
./build-site.sh config/your-site.yaml public-siteThe script also respects environment variables (new names listed first, legacy aliases still work):
RADIOSTATIC_CONFIG/SITEGEN_CONFIG– default config path (overridden by positional argument)RADIOSTATIC_OUTPUT/SITEGEN_OUTPUT– default output directoryRADIOSTATIC_VERBOSE/SITEGEN_VERBOSE– set to0to suppress verbose logging
make build-local supports the same options:
make build-local CONFIG=config/your-site.yaml OUTPUT=public-sitemake serve-localThis runs python3 -m http.server 8080 inside the site-output/ directory so you can browse the generated pages at http://localhost:8080.
Stop the server with Ctrl+C when finished.
- Configuration –
smoke-test.yamldemonstrates every supported feature (home page hero, sections, blog, sitemap). - Blog content –
content/blog/contains Markdown posts for two sample authors (alex-leeandjamie-hart) plus a default article used by the blog landing page. - Assets –
examples/demo-site/assets/holds the CSS, JavaScript, SVG artwork,site.webmanifest, androbots.txtreferenced by the demo configuration. - Stagit sample –
examples/demo-site/stagit/packages a small bare git repository and static HTML so you can illustrate a repository mirror alongside the site. Step-by-step integration lives in the Stagit section below.
To experiment with the assets that ship inside static-sitegen/assets/, run:
./prepare-demo-assets.shThe script mirrors examples/demo-site/assets/ into static-sitegen/assets/ (useful when tweaking the default theme). Pass a different source directory if you maintain your own asset pack:
./prepare-demo-assets.sh path/to/your-assets- Duplicate a post in
content/blog/or create a new Markdown file. - Update the front matter (
title,slug,author,publishedAt,heroImage, etc.). - Re-run
./build-site.sh(ormake build-local) to regenerate the site.
Authors are configured in the YAML file under blog.authors. Add new entries to expose additional avatars, bios, and social links.
The demo includes:
examples/demo-site/stagit/repos/hello-world.git– a tiny bare repository with two commits.examples/demo-site/stagit/html/– placeholder HTML styled to resemble a stagit export.
smoke-test.yaml declares an extraCopies entry so the build automatically mirrors the HTML folder into site-output/stagit/. Replace these artifacts with real stagit output when you connect your own repositories or point the from path at your own build pipeline.
- Read docs/configuration.md for a tour of the YAML keys and how they map to templates.
- Update the navigation links, sections, and call-to-action blocks in your configuration file to match your project.
- Swap the SVG artwork under
examples/demo-site/assets/static/img/and rerun the build. - Commit the resulting
site-output/directory to the platform of your choice or upload it to static hosting.
That’s it—you now have a working RadioStatic build and a clear path for customising it.