Technical reference
smartpress
Build a zero-JS static article site from hand-written HTML fragments.
DESCRIPTION
smartpress builds a single-page or multi-page static site from
articles/slug/article.html files. Run make build
to generate site/, then serve it as static files or open
site/index.html through file://.
The build targets POSIX.1-2017 shell and utilities for portability across BSD, Linux, macOS, and other Unix-like systems. The generated interface uses HTML and CSS only; it requires no client-side scripting or server-side processing.
FEATURES
- File-backed code blocks with syntax highlighting, collapsible headers, optional footers, raw links, sizes, and header/footer navigation.
- Download blocks with file sizes and checksums.
- Image blocks and directory galleries with responsive sizing, framing, alignment, text flow, and enlarged-image popovers.
- Inline players for local video files and YouTube links.
- Small, editable HTML article fragments with optional arbitrary HTML.
- Single-page or per-article output; optional unlisted articles and extensionless page links.
- Responsive article, section, and subsection indexes; title/date sorting, summary tooltips, and creation/modification metadata.
- Opt-in Atom entries for whole articles or sections, with subsection links.
- Upstream colour palettes, Exact/Auto/Light/Dark modes, independent corner styles, and background-opacity controls.
- SVG logos, favicons, and optional fixed or randomised themed backdrops; a single Unicode symbol provides the logo/favicon fallback.
- Theme, contact, and license popovers; contact messages sent as marked GET requests for server-log collection.
- No cookies or browser storage; optional release-archive packaging.
DOWNLOADS
smartpress_1.0.73.tarsource archive
REQUIREMENTS
- Build: POSIX.1-2017
sh,make, and utilities; BSD and GNU make are supported. - Utilities:
awk,sed,grep,sort,tr,date,dirname,pwd,printf,mkdir,rm,wc,cat,cksum,chmod,mv,cp, andfind. - Release targets:
cmpandpaxwith ustar output. Some systems require installingpaxseparately. - Text inputs: UTF-8 without NUL bytes. Host text utilities must preserve UTF-8 and support the longest input line, including SVG and code files.
- Optional highlighting:
pygmentize(Pygments, default) or GNUsource-highlight. - Optional download checksums:
sha256,sha256sum,shasum, oropenssl; the first successful one is used. - Browser: CSS
:has(),:target,prefers-color-scheme, nativedetails/summary, and HTML popovers. CSSrandom()is optional.
BUILD
- Work from the project root, which contains
Makefile. - Edit
PUBLIC_SITE_ENVin the Makefile for the site's identity, appearance, and feed settings. Set its ownSITE_URLandSITE_AUTHOR, or disableSITE_FEED. - Add or edit articles below
articles/. - Run
make build. Opensite/index.htmlto preview, or deploy the contents ofsite/to the web root.
- Environment and command-line make variables override profile defaults.
buildcopies all article directories and renders the site in staging before replacingsite/.- All targets copy
assets/tosite/assets/. It contains the shared SVG and Roboto fonts. The smartpress article is optional formake buildandmake smarts, and required formake releaseandmake full. - Keep maintained files outside
site/. Run builds from the source root, never from the generated tree. - Rerun after changing articles, assets, CSS, or settings. Stylesheet and favicon URLs carry content-based cache tokens.
- All targets share
site/; run one target at a time, without parallel builds. Keep the Makefile'sFORCEtarget name free of files.
Build examplesRun each example from the project rootraw↓
make build
# Build smartstechnical.com as a single page with the fixed Smarts theme,
# extensionless links and the newest articles first.
make smarts
# Set independent corner and background-opacity defaults.
make DEFAULT_ROUNDING=rounded DEFAULT_BACKGROUND_OPACITY=20 build
# Per-article pages with system light/dark selection and no theme menu.
make SITE_MODE=multi-page DEFAULT_THEME_MODE=auto \
DEFAULT_THEME_SELECTOR=false build
# Per-article files for file:// navigation, using a fixed theme.
make SITE_MODE=multi-page SITE_URL_STYLE=html \
DEFAULT_THEME=solarized-dark DEFAULT_THEME_MODE=off \
DEFAULT_THEME_SELECTOR=false build
# Published articles only, without theme controls or an article backdrop.
make SITE_MODE_UNLISTED=false SITE_BACKGROUND=false \
DEFAULT_THEME_MODE=off DEFAULT_THEME_SELECTOR=false build
# Set this site's Atom feed identity.
make SITE_FEED=true SITE_URL=https://example.com \
SITE_AUTHOR='Example Author' build
For generator release packaging, see MAINTENANCE.
ARTICLE FORMAT
Article structure
Create articles/slug/article.html with this structure:
articles/getting-started/article.htmlraw
<article class="article" id="getting-started" data-title="Getting Started" data-created="2026-07-09" data-modified="2026-07-09" data-feed-sections="h1">
<header class="article-header">
<p class="kicker">Guide</p>
<h1>Getting Started</h1>
<p class="summary">
A short article built from one editable HTML fragment.
</p>
</header>
<section>
<h2>Example</h2>
<p>Article text is normal HTML.</p>
<h3>Subsection</h3>
<p>Plain one-line h3 headings appear under their preceding section.</p>
</section>
</article>
- Keep the opening
articletag on one line. Its class list must includearticle;idmust match the directory name;data-titlesupplies the index title. - Use double-quoted attributes read by the generator.
- The header contains
h1, an optional kicker, andp class="summary". The summary may span lines and contain inline HTML. - Use normal HTML for article content. Author HTML and inline SVG are
trusted input; they are not sanitised. Author-supplied scripts or
external resources remain part of the output. Keep each opening and
closing
scripttag on one line. Script bodies, including inline JSON, are copied verbatim. data-listed:true(default) orfalse; see Unlisted articles under CONFIGURATION.data-feed-sections:none(default),h1,h2, orh3; see ATOM FEED.
Headings and links
- Use
h2sections andh3subsections. Use one heading per line, with plain text and its closing tag on that line. Anh3follows anh2. - Explicit heading IDs are optional. Otherwise, IDs derive from the article and heading text; repeated names receive unique suffixes.
- Slugs and explicit IDs use ASCII letters, digits, dots, underscores, and hyphens. Article directory names must not start with a dot. Article, heading, control, and generated-block IDs must not collide. Keep IDs on other author elements unique.
- In multi-page mode,
indexis reserved for the homepage in every combination of upper- and lowercase letters. - Single-page links use
#article-idor#heading-id. Multi-page links useslug.html#heading-id, orslug#heading-idwith extensionless URLs. - Copy section links from the generated index, or assign explicit IDs for links that must survive heading renames. Author-written links are not rewritten when the output mode changes.
Headings with optional IDs and datesraw
<h2 data-created="2026-07-09">BUILD</h2>
<h3>Requirements</h3>
<h3 id="custom-subsection" data-modified="2026-07-10">Explicit Subsection Anchor</h3>
<h2 id="custom-anchor" data-created="2026-07-09" data-modified="2026-07-10">Explicit Anchor</h2>
Dates
Article, h2, and h3 attributes accept
auto or a value beginning with a valid YYYY-MM-DD
date. Metadata, date sorting, and feed timestamps use the date portion.
- Article data-created
- Missing, empty, or
auto: current UTC build date. - Article data-modified
- Missing or empty: resolved creation date.
auto: UTC build date. - Heading dates
data-modifiedtakes precedence overdata-created.autouses the UTC build date. An undatedh2inherits the article's resolved modification date; an undatedh3contributes no date. A newer childh3date updates its parent section's effective date.
- The effective article modification date is the newest resolved article or heading date. It drives Updated metadata, modification sorting, and whole-article feed entries.
- Missing and empty heading attributes have the same fallback behaviour.
- The header displays Created, plus Updated when different, with middle-dot separators. Unlisted articles also display Unlisted.
- Heading dates never reorder sections or subsections. Creation sorting continues to use the article's creation date.
- Use explicit dates for stable publication metadata. The build does not write resolved dates or generated heading IDs into source files.
GENERATED BLOCKS
- Keep each marker on one source line. A recognised marker must be empty and close on that line, or the build stops. A tag name and class on separate lines pass through as ordinary HTML.
- Local
data-srcvalues are relative to the article directory. Path components use ASCII letters, digits, dots, underscores, and hyphens; empty components,.,.., and symlinks are rejected. - Missing or invalid sources render visible missing blocks.
data-titleoverrides the displayed source path;data-noteadds a header qualifier.
Code blocks
Code block markersraw
<pre class="code-block" data-src="src/example.c" data-title="example.c" data-note="A short C example" data-lang="c"></pre>
<pre class="code-block" data-src="build.sh" data-lang="sh" data-open="false" data-footer="false"></pre>
<pre class="code-block" data-src="output.txt" data-lang="text" data-header="false"></pre>
<pre class="code-block" data-src="output.txt" data-title="output.txt" data-lang="text" data-header="false" data-footer="true"></pre>
data-lang: explicit lexer, or omit for filename inference. Pygmentsautoalso permits content guessing.data-open="false": initially collapsed; default is open.data-header="false": always visible, without a header.data-footer="true"or"false": override automatic footer selection. Normally shown aboveCODE_FOOTER_LINES; headerless blocks require explicittrue.- Header/footer arrows navigate between the bars. Raw links and sizes refer to the original file.
HIGHLIGHTER selects pygments (default),
source-highlight, or none:
- Missing tools, unknown lexers, failed highlighting, or unusable output
fall back to escaped source.
nonealways uses escaped source. - Source-highlight uses
tools/html-fragment.outlang; an omitted orautolanguage enables its language inference. - Highlighted output follows the selected theme. Whitespace-only
Pygments
span.wand Source-highlightspan.sh-normalwrappers are removed without removing whitespace.
Highlighter selectionraw
make HIGHLIGHTER=none build
make HIGHLIGHTER=pygments build
make HIGHLIGHTER=source-highlight build
Download blocks
Download block markerraw
<div class="article-downloads" data-src="release.tar.gz" data-title="release.tar.gz" data-note="Source archive"></div>
- One
data-srcfile per marker. - Displays the file size and, when available, its SHA256 checksum.
data-titlechanges the label, not the download path.
Image blocks
A file creates a single image; a directory creates a gallery. Both use the same size, alignment, frame, header, and footer options.
Image and gallery markersraw
<figure class="image-block" data-src="images/diagram.png" data-title="Diagram" data-note="Article-local image path" data-alt="Build flow diagram" data-caption="Article-local image"></figure>
<figure class="image-block" data-src="images/screenshots" data-title="Screenshots" data-alt="Installation screenshot" data-scale="large" data-border="fit"></figure>
<figure class="image-block" data-src="images/icon.png" data-title="Icon" data-alt="Small icon" data-scale="small" data-border="fit" data-align="start" data-header="false" data-footer="true"></figure>
<figure class="image-block" data-src="images/plain.png" data-alt="Borderless image" data-scale="small" data-border="none" data-align="end"></figure>
- data-alt / data-caption
- Alternative text / visible caption. A gallery caption covers the whole block; its alternative text prefixes each readable filename.
- data-open / data-header
- As for code blocks: open and headed by default;
falsecollapses the block or removes its header. - data-footer
- Shown with a header unless
false. Headerless images require explicittrue. - data-scale
small(20rem),medium(32rem),large(48rem), orfull(default). Caps image/gallery width within available space; frame padding is additional.- data-border
full(default): full-width frame.fit: frame fitted to the image or gallery, with equal-width header and footer.none: no frame, padding, header, or footer; the block retains an opaque article-background surface.- data-align
start,center(default), orend. Aligns the image inside a full frame, or the entire fit/borderless block.
- Single images preserve aspect ratio, scale down to fit, and do not upscale.
- Images load lazily and decode asynchronously.
- Unknown scale, border, or alignment values stop the build.
Galleries and viewers
- Galleries read immediate AVIF, GIF, JPEG, PNG, SVG, and WebP files in filename order. They do not recurse; hidden, unsupported, or invalid filenames are ignored. An empty gallery renders a missing block.
- Previews occupy equal square cells and may crop. Small galleries use one to three columns; larger galleries fit columns to the block width.
- Thumbnail tooltips show filenames. The footer shows the image count; each enlarged gallery image has its own raw link.
- Click an image to open its themed viewer over the article pane. The complete image retains its aspect ratio and scales down without upscaling.
- Gallery viewers have pointer-operated Previous/Next arrows in filename order, stopping at each end. Keyboard users close the viewer and select another thumbnail.
- Click the enlarged image or X, press Escape, or click outside to close. Image cursors indicate zoom in/out. Missing blocks have no viewer.
Text beside images
- Place the image marker directly inside an article
section, before the text that should flow beside it. - Use
data-border="fit"or"none"withdata-align="start"or"end".
- Above 760px, the block occupies at most 55% of the section width, subject to its size limit. Following paragraphs and text lists flow beside it.
- Headings, generated blocks, preformatted blocks, tables, horizontal rules, consecutive images, and the section end clear the flow.
- A centred, borderless single image is only as wide as its contents.
- Centered/full-frame blocks stay on their own row. At narrower widths, blocks return to normal flow and start/end-aligned images are centred.
Video blocks
Set data-src to a file in the article directory or a link
to one YouTube video. Give the player a descriptive data-title.
Readers press Play to watch the video in the article.
Local video and YouTube markersraw
<figure class="video-block" data-src="videos/sliding-panel.mp4" data-title="Sliding panel" data-open="false"></figure>
<figure class="video-block" data-src="https://youtu.be/M7lc1UVf-VE" data-title="YouTube player demonstration" data-scale="medium"></figure>
Sliding panelraw↓
- Local files
- Playback depends on the browser and codec. Download video stays below the player, even with a borderless frame. For HLS, keep the playlist and its media files together.
- File extensions (case-insensitive)
- mp4, m4v, webm, ogv, ogg, ogx, mov, qt, avi, mkv, mpg, mpeg, mpe, m2v, ts, mts, m2ts, m3u8, 3gp, 3gpp, 3g2, and 3gpp2.
- YouTube links
- Use a watch,
youtu.be, Shorts, live or embed link. Links with a timestamp still play from the beginning. Preview over HTTP or HTTPS. Use Watch on YouTube if embedding is unavailable.
For size, alignment and framing, see
Image blocks.
Videos also accept data-caption, data-note,
data-open, data-header and data-footer.
CONFIGURATION
Edit Makefile defaults or override individual values with make NAME=value build.
PUBLIC_SITE_ENV: site defaults forbuildandfull.RELEASE_SITE_ENV: site defaults forrelease.BUILD_ENV: shared defaults.- Below, public means build/full; release means the
release profile. Boolean settings accept
trueorfalse.
Site and navigation
- SITE_TITLE
- Header brand, site page title, and contact-marker prefix.
Default: public
smartstechnical; releasesmartpress. - SITE_MODE
single-page(default): all generated articles inindex.html.multi-page: one article perslug.html, plusindex.htmlcontaining the first listed article. Each page embeds its navigation rules and shares the CSS.- SITE_URL_STYLE
html: page links retain.html.extensionless: multi-page navigation and contact actions useslugand./; files retain.html. Requires a server rewrite. Single-page output is unaffected. Default: publicextensionless; releasehtml.- ARTICLE_ORDER
- Initial index order:
title(default),created, ormodified. Title sorting is case-insensitive; date sorting is newest first. Ties use the slug. Visitors can switch order with the index controls; sections and subsections retain source order.
- The first listed article in the configured order is the initial article.
- Multi-page
slug.htmltitles use article title followed bySITE_TITLE; the index page usesSITE_TITLE. - Multi-page slugs cannot be
index. Extensionless slugs also cannot contain dots or collide with a path at the site root. - Landscape navigation uses a left pane; narrow/portrait navigation uses horizontal article, section, and conditional subsection rows.
- In browsers supporting scroll-driven CSS masks, index lists and Theme/license popover bodies fade at edges with hidden content. Fades clear at reached boundaries; unsupported browsers scroll without fades.
- Article-title tooltips show a plain-text summary and a final line of Created/Updated dates. Unsupported summary markup falls back to dates only. Native tooltip appearance is browser-controlled.
- Single-page HTML includes all generated article bodies and highlighted
spans. Use multi-page output, excerpts, or
HIGHLIGHTER=nonefor large code-heavy collections.
Unlisted articles
Mark an article data-listed="false".
SITE_MODE_UNLISTED=true generates it; false
excludes it from generated pages and navigation. Default: public
true; release false.
- Single-page: accessible by article/heading fragment, with section navigation, but absent from every article-title index.
- Multi-page: its page indexes all listed articles plus itself, never
another unlisted article. Listed pages omit it. Its robots directive is
noindex, nofollow. - Unlisted content is public. Single-page output has no per-article robots
directive. All included source directories are still copied to
site/articles/, even when unlisted generation is disabled. - At least one listed article is required. Unlisted articles never appear in the Atom feed.
Themes and controls
- DEFAULT_THEME
- Theme input ID from
tools/theme-menu.html, with or withouttheme-. Default: publiceverforest-hard-dark; releasesolarized-dark. - DEFAULT_THEME_MODE
off: no mode control; use the selected theme unchanged.exact,auto,light, ordark: show all four controls and select that initial mode. Default: publicexact; releaseoff.- DEFAULT_THEME_SELECTOR
true(default): show the Theme popover in either page mode.false: fix the theme, corners, and opacity to build values. The separate mode control remains governed byDEFAULT_THEME_MODE.- DEFAULT_ROUNDING
square,soft,rounded, orround. Applies across controls, highlights, blocks, images, and popovers. Default: publicsoft; releasesquare.- DEFAULT_BACKGROUND_OPACITY
- Initial SVG backdrop opacity:
0to100percent in steps of 10. Default:30. Its selector appears above Corners whenSITE_BACKGROUND=true.
- Exact uses the selected palette unchanged. Auto follows the browser's light/dark preference; Light and Dark force the mapped variant.
- Corner style and background opacity are independent of theme/mode changes.
- Selections persist within a single-page document. Reloading or opening another multi-page article restores build settings.
- Set light/dark pairs with
data-auto-lightanddata-auto-darkon theme inputs intools/theme-menu.html. Supply both IDs, refer to existing themes, and include the source theme in its pair. Unmapped themes remain unchanged in every mode. - Palettes retain upstream RGB values.
styles.cssmaps them to interface and syntax roles, without colour mixing or contrast adjustment.
Theme pair mappingExcerpt from tools/theme-menu.htmlraw
<input type="radio" name="theme" id="theme-solarized-dark" data-auto-dark="theme-solarized-dark" data-auto-light="theme-solarized-light" checked>
<label for="theme-solarized-dark">Dark</label>
<input type="radio" name="theme" id="theme-solarized-light" data-auto-dark="theme-solarized-dark" data-auto-light="theme-solarized-light">
<label for="theme-solarized-light">Light</label>
Logo and favicon
- SITE_ICON_PATH
- Custom SVG path relative to the build tree. Used as the header logo
and copied unchanged to
favicon.svg. Default: publicassets/smartstechnicalsundual.svg; release empty. - SITE_ICON_PATH_THEME
true: embed and theme the header SVG; requiresSITE_ICON_PATH.false: display it as an external image. The favicon always keeps its original colours. Default: publictrue; releasefalse.- SITE_ICON
- Single Unicode symbol for the header and generated favicon when
SITE_ICON_PATHis empty. Default: public U+4DEA; release U+4DD6. - SITE_ICON_COLOUR
- Optional
#rgbor#rrggbboverride for the Unicode icon. Empty (default): header uses the article-title colour; generated favicon uses SVG's default text fill. Unused with a custom SVG.
- Store site artwork in
assets/. Use the same path-component rules as generated blocks and supply a readable, non-empty.svgsource file. The generatedfavicon.svgis reserved for output. - For a themed logo, assign double-quoted
class="colour-out"andclass="colour-in"attributes to drawable elements or groups. Edit the SVG directly or use Inkscape's XML Editor. When the same SVG is inlined as the header icon and backdrop, use artwork withoutidattributes. - CSS fills
colour-outwith the article background andcolour-inwith its title colour. The mapping follows the active theme and mode. Avoid inline style declarations that override those fills. - Restore the Unicode icon with
SITE_ICON_PATH=andSITE_ICON_PATH_THEME=false.
Custom SVG ThemeSmart Systems star with colour-out and colour-in paths↓
Custom SVG Theme - smartstechnicalsundual.svg (1 of 1)
rawCustom SVG and Unicode icon buildsraw
# Use the bundled SVG as a themed header icon.
make SITE_ICON_PATH=assets/smartstechnicalsundual.svg \
SITE_ICON_PATH_THEME=true build
# Restore the Unicode icon.
make SITE_ICON_PATH= SITE_ICON_PATH_THEME=false build
Article backdrop
- SITE_BACKGROUND
- Enable the fixed article-pane SVG background.
Default: public
true; releasefalse. - SITE_BACKGROUND_PATH
- SVG path relative to the build tree, with the same file and class
requirements as a themed logo. Default:
assets/smartstechnicalsundual.svg. - SITE_BACKGROUND_RANDOM
true(default): browsers supporting CSSrandom()choose a scale and crop on document load. Unsupported browsers, orfalse, retain the SVG's base fit.
- The backdrop paints
colour-inwith the theme's background artwork colour;colour-outis unpainted.DEFAULT_BACKGROUND_OPACITYcontrols opacity. - Use
preserveAspectRatio="xMidYMid slice"for a centred cover crop, as in the bundled SVG. - Single-page navigation retains one backdrop; each multi-page document can receive a new random crop. Code, download, image and video surfaces stay opaque.
Highlighting and local CSS
- HIGHLIGHTER
pygments(default),source-highlight, ornone. See Code blocks under GENERATED BLOCKS.- CODE_FOOTER_LINES
- Non-negative source-line threshold for automatic code footers.
Default:
23; blocks at or below it omit the footer.
Create custom-styles.css in the project root for site-local styling:
- All four make targets copy it when present, including the release archive. Supply a readable regular file.
- Pages load it after standard CSS and embedded navigation rules. Normal specificity applies; existing CSS variables follow the active theme.
- Without the file, no custom stylesheet link is generated.
Feed identity
- SITE_FEED
- Generate
feed.atom, discovery metadata, and the header's Atom link. Default: publictrue; releasefalse. - SITE_URL
- Canonical site root, including any deployment subdirectory. An
enabled feed requires an absolute HTTP(S) URL with a host.
Omit whitespace, queries and fragments. Trailing slashes are removed. Default: public
https://smartstechnical.com; release empty. - SITE_AUTHOR
- Atom author name. Default: public
v6support@smartsystems.co.uk; releaseSITE_TITLE.
ATOM FEED
Enable SITE_FEED, set the feed identity, and opt listed
articles in with data-feed-sections:
- none
- No entries; also used when the attribute is missing or empty.
- h1
- One entry with the article title, link, and available plain-text summary.
- h2
- One entry per section, titled "Article title - Section heading", with its section link as content.
- h3
- As
h2, adding a linked list of that section'sh3headings.
h2/h3fall back toh1when the article has no sections. Anh3entry without child headings contains only its section link. Section entries do not include article prose.- Entry dates follow ARTICLE FORMAT:
h1uses the effective article modification date; section entries use their effectiveh2date, including newer child dates. - An article-level
autodate participates in whole-article entries. For section entries, it is only the fallback for an undatedh2. - Dates use midnight UTC. Article groups sort by their newest entry; sections and linked subsections retain source order. The feed date is the newest entry date, or the UTC build date when empty.
- Links follow
SITE_MODEandSITE_URL_STYLE. IDs remainSITE_URL/#article-idorSITE_URL/#section-id, independent of dates and output mode. - Explicit heading IDs preserve feed identity across renames and
reordering of duplicate headings. Changing
SITE_URLchanges IDs. - New sections create entries; edits and new
h3links retain the parent entry ID. Switching to section mode introduces existing sections as entries. Read/unread status is controlled by the reader. - The Atom 1.0 feed includes author, generator/version, HTML links, and the versioned site favicon. It may contain zero entries.
SERVING
- Deploy the contents of
site/without changing relative paths. - For local
file://access, opensite/index.html; multi-page navigation requiresSITE_URL_STYLE=html. - Serve
.atomasapplication/atom+xml. - Extensionless multi-page URLs require an internal rewrite from missing
extensionless paths to their
.htmlfiles.
The OpenBSD httpd(8) example supplies the Atom MIME type and
rewrite. Replace its host, certificate, and document-root paths; validate
before reloading. Keep specific location rules before the final rewrite.
OpenBSD httpd.conf exampleraw↓
types {
include "/usr/share/misc/mime.types"
application/atom+xml atom
}
server "smartstechnical.com" {
listen on * port 80
location "/.well-known/acme-challenge/*" {
root "/acme"
request strip 2
}
location * {
block return 301 "https://$HTTP_HOST$REQUEST_URI"
}
}
server "smartstechnical.com" {
listen on * tls port 443
tls {
certificate "/etc/ssl/smartstechnical.com.fullchain.pem"
key "/etc/ssl/private/smartstechnical.com.key"
}
root "/htdocs/smartstechnical.com"
# Required when smartpress uses SITE_URL_STYLE=extensionless.
location not found match "/[^./]+$" {
request rewrite "$DOCUMENT_URI.html"
}
}
Contact messages
Set SITE_CONTACT_EMAIL to one plain address to open the reader's
mail client. Use an ASCII domain and a mailbox name made up of letters,
digits, dots, or the characters ! ' * + _ ~ -. An empty value
selects the contact form. Only make smarts defaults to
v6support@smartsystems.co.uk. To use the form for that target,
run SITE_CONTACT_EMAIL= make smarts.
- The Contact popover submits a GET to the current page and displays a submission confirmation. It requires HTTP(S); use HTTPS for transport encryption. The confirmation does not verify delivery or logging.
reply: optional address, maximum 254 characters.message: required, maximum 500 characters.- The first query item is
sanitised-site-title_contact=1. The title is lowercased; runs outside ASCII letters, digits, dots, underscores, and hyphens become an underscore; edge underscores are removed. A result without letters or digits becomessmartpress. - The default markers are
smartstechnical_contact=1for public builds andsmartpress_contact=1for releases. - Configure access logging to retain query strings. Extract and process marked requests from the log; the site has no separate delivery or storage service.
- Messages remain in URLs, browser history, and server logs. Do not include confidential information.
Contact requestBrowser-encoded query valuesraw
Browser URL with SITE_TITLE="Example Site":
https://host.example/?example_site_contact=1&reply=v6support%40smartsystems.co.uk&message=Short+message#contact-confirmation
HTTP request target logged by a server that retains query strings:
GET /?example_site_contact=1&reply=v6support%40smartsystems.co.uk&message=Short+message
MAINTENANCE
Generator releases
These targets package the generator; routine site updates use make build.
- GENERATOR_LABEL
- Generator name displayed in site and Atom metadata.
Default:
smartpress; archive names remain smartpress. - GENERATOR_VERSION
- Dot-separated digits used in metadata and archive names.
Default:
1.0.73. - make release
- Builds only
articles/smartpresswithRELEASE_FILES. The manual is listed as the homepage in the standalone release copy. Creates a working release tree insite/andsmartpress_VERSION.tarat the project root, under a matching top-level directory. Its own download is absent inside that tree/archive. - make full
- Requires the matching root release archive. Builds all articles with
RELEASE_FILESand installs the archive into the staged generator article. Leaves that complete tree insite/.
- The generator article must contain exactly one
data-release="generator"download marker. - Both targets update that complete marker line to the current archive
name and remove
smartpress_*.tarandsmartpress_*.tar.gzfrom the source generator article directory after publication. Other root archives remain. releaseandfullcheck that the archive contains the files needed to run the default make targets before publishing it.- Archives use uncompressed ustar format, without macOS metadata sidecars. Paths or file sizes exceeding its limits stop packaging before publication.
buildusesRUNTIME_FILESand all articles; it leaves source download markers and archives unchanged.
- Update
GENERATOR_VERSIONand runmake release. - Copy the root archive into
articles/smartpress/, then runmake buildto publish it with other articles. Alternatively,make fullintegrates it into staged output.
Failures and cleanup
- A validation, staging, or rendering failure preserves the previous
site/. If installing the site or release archive fails, the build restores the previous site. If restoration fails, it reports where the backup is kept. - If updating the source marker or removing a source archive fails after publication, the error identifies the installed output and the source path to correct before rerunning the target.
- Targets exit zero on success and non-zero on invalid input or an unhandled command/filesystem failure. Correct the diagnostic and rerun.
- Missing block sources, optional highlighting, and unavailable checksums are non-fatal: blocks show missing-source notices, escaped code, or no checksum.
- Normal exits/signals clean temporary files. After an untrappable
termination, stop all builds and inspect
.site-build.*under the project root,.render-build.*under the build root, and.article-build.*underarticles/smartpress/before removing leftovers. Existing workspace names are never reused; a collision stops the build. - There is no clean target. Remove
site/to discard generated output; remove obsolete root archives by exact filename. - Inclusion lists accept only regular files and directories. This also applies to files inside article directories. Each pathname in a release archive must fit on one line.
Remove generated outputraw
# Run from the project root when no build is running.
rm -rf site
- Missing release archive
- Run
make releasewith the same version beforemake full, from the same source root. - No listed articles found
- Provide at least one article with
data-listed="true"or nodata-listedattribute. - Invalid theme, SVG, heading, marker, or path
- Check the named input against CONFIGURATION, ARTICLE FORMAT, or GENERATED BLOCKS. Diagnostics identify the rejected value or source.
Build environment
- PATH
- Locates build utilities, highlighters, and checksum programs.
- LC_ALL / SOURCE_HIGHLIGHT_DATADIR
- The scripts set
LC_ALL=C; the generator unsetsSOURCE_HIGHLIGHT_DATADIR.
tools/build-profile.shinvokestools/build.shwith internalBUILD_ROOTandARTICLE_SELECTIONsettings.- From the project root, run
sh tools/build.shto render directly. It writesindex.htmland other generated files in the project root. Before replacing or removing output, it checks for an earlier Smartpress build of each file. If an output name belongs to an unrecognised file, the build stops and names the file to move aside. Move an older, unmarkedfeed.atomaside once when upgrading a direct build. - Direct execution uses release-style site defaults and the script
version above; it reads
custom-styles.cssfrom its build root.
FILES
Maintained inputs
- Makefile
- Targets, profile defaults, and inclusion lists.
- articles/slug/article.html / articles/slug/*
- Article fragments and their code, image, gallery, video and download assets.
- assets/
- Shared site SVG and fonts in
assets/fonts/. - styles.css / custom-styles.css
- Shared layout, palettes, and syntax roles / optional site-local overrides.
- tools/build.sh / tools/build-profile.sh
- Article renderer / target staging and packaging.
- tools/theme-menu.html
- Theme controls and light/dark pair mappings.
- tools/html-fragment.outlang
- Source-highlight HTML-fragment output definition.
- tools/license.txt / THIRD_PARTY_NOTICES.txt / licenses/
- Static project license / palette sources and retained third-party notices.
- README.smartpress
- Plain-text edition of this reference.
Generated output
- site/index.html / site/slug.html
- Entry page / additional multi-page articles, with embedded navigation rules.
- site/articles/
- Copied article directories, including source HTML and published assets.
- site/assets/
- Shared site assets, copied unchanged.
- site/styles.css / site/custom-styles.css
- Copied shared stylesheet / optional custom stylesheet.
- site/theme-auto.css
- Derived theme-mode rules; present when the mode control is enabled and a selectable theme has a light/dark mapping.
- site/favicon.svg / site/feed.atom
- Generated or copied favicon / optional Atom feed.
- site/THIRD_PARTY_NOTICES.txt / site/licenses/
- Copied notices required by the published site.
Source tree and routine build outputraw↓
.
|-- Makefile
|-- README.smartpress
|-- THIRD_PARTY_NOTICES.txt
|-- articles
| `-- smartpress
| |-- article.html
| `-- ...
|-- assets
| |-- fonts
| `-- smartstechnicalsundual.svg
|-- custom-styles.css (optional)
|-- licenses
| |-- mit.txt
| |-- oksolar-cc0.txt
| `-- roboto-apache-2.0.txt
|-- site
| |-- THIRD_PARTY_NOTICES.txt
| |-- articles
| | `-- smartpress
| | |-- article.html
| | `-- ...
| |-- assets
| | |-- fonts
| | `-- smartstechnicalsundual.svg
| |-- custom-styles.css (optional)
| |-- favicon.svg
| |-- feed.atom (when enabled)
| |-- index.html
| |-- licenses
| | |-- mit.txt
| | |-- oksolar-cc0.txt
| | `-- roboto-apache-2.0.txt
| |-- styles.css
| `-- theme-auto.css (when mapped modes are enabled)
|-- styles.css
`-- tools
|-- build-profile.sh
|-- build.sh
|-- html-fragment.outlang
|-- license.txt
`-- theme-menu.html
LICENSE
- smartpress: BSD 3-Clause; see
tools/license.txt. - The license popover embeds that file as escaped text. Its first non-blank line supplies the title; the text is otherwise static.
- Bundled palettes retain their upstream licences; see
THIRD_PARTY_NOTICES.txtandlicenses/. The license and Theme popovers link to those notices.