Technical reference
Build a zero-JS static article site from hand-written HTML fragments.
arachnopress 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 runs in POSIX-like BSD, Linux, and macOS environments. The generated interface uses HTML and CSS only; it requires no client-side scripting or server-side processing.
sh, BSD or GNU make,
standard Unix utilities, and mktemp.awk, sed, grep,
sort, tr, date, dirname,
pwd, printf, mkdir, rm,
wc, cat, cksum, chmod,
mv, cp, and find.cmp and tar with gzip support.mktemp is widely available but is not specified by POSIX.pygmentize (Pygments, default) or
GNU source-highlight.sha256, sha256sum,
shasum, or openssl; the first successful one is used.:has(), :target,
prefers-color-scheme, native details/summary,
and HTML popovers. CSS random() is optional.Makefile.PUBLIC_SITE_ENV in the Makefile for the site's
identity, appearance, and feed settings. Set its own SITE_URL
and SITE_AUTHOR, or disable SITE_FEED.
If removing the bundled article, replace its SVG paths or disable the
SVG icon and backdrop.articles/.make build. Deploy or inspect site/index.html.build copies all article directories and renders the site
in staging before replacing site/.site/. Run builds from the
source root, never from the generated tree.site/; run only one build at a time.For generator release packaging, see MAINTENANCE.
Create articles/slug/article.html with this structure:
article tag on one line. Its class list
must include article; id must match the directory
name; data-title supplies the index title.h1, an optional kicker, and
p class="summary". The summary may span lines and contain
inline HTML.data-listed: true (default) or
false; see Unlisted articles under CONFIGURATION.data-feed-sections: none (default),
h1, h2, or h3; see ATOM FEED.h2 sections and h3 subsections. Every
source h2/h3 is indexed; each must contain plain
text and close on the same line. An h3 follows an h2.#article-id or #heading-id.
Multi-page links use slug.html#heading-id, or
slug#heading-id with extensionless URLs.
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.
auto: current UTC build date.auto: UTC build date.data-modified takes precedence over data-created.
auto uses the UTC build date. An undated h2
inherits the article's resolved modification date; an undated
h3 contributes no date. A newer child h3 date
updates its parent section's effective date.data-src is relative to the article directory. Path
components use ASCII letters, digits, dots, underscores, and hyphens;
empty components, ., .., and symlinks are rejected.data-title overrides the displayed source path;
data-note adds a header qualifier.data-lang: explicit lexer, or omit for filename inference.
Pygments auto also 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 above
CODE_FOOTER_LINES; headerless blocks require explicit
true.
HIGHLIGHTER selects pygments (default),
source-highlight, or none:
none always uses escaped source.tools/html-fragment.outlang; an
omitted or auto language enables its language inference.span.w and Source-highlight
span.sh-normal wrappers are removed without removing whitespace.data-src file per marker.data-title changes the label, not the download path.A file creates a single image; a directory creates a gallery. Both use the same size, alignment, frame, header, and footer options.
false
collapses the block or removes its header.false. Headerless images
require explicit true.small (20rem), medium (32rem),
large (48rem), or full (default).
Caps image/gallery width within available space; frame padding is additional.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.start, center (default), or end.
Aligns the image inside a full frame, or the entire fit/borderless block.section,
before the text that should flow beside it.data-border="fit" or "none" with
data-align="start" or "end".Edit Makefile defaults or override individual values with make build NAME=value.
PUBLIC_SITE_ENV: site defaults for build and full.RELEASE_SITE_ENV: site defaults for release.BUILD_ENV: shared defaults.true or false.arachnogoat; release arachnopress.single-page (default): all generated articles in
index.html. multi-page: one article per
slug.html, plus index.html containing the first
listed article. Each page embeds its navigation rules and shares the CSS.html: page links retain .html.
extensionless: multi-page navigation and contact actions
use slug and ./; files retain .html.
Requires a server rewrite. Single-page output is unaffected.
Default: public extensionless; release html.title (default), created,
or modified. 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.slug.html titles use article title followed by
SITE_TITLE; the index page uses SITE_TITLE.index. Extensionless slugs also
cannot contain dots or collide with a path at the site root.HIGHLIGHTER=none
for large code-heavy collections.
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.
noindex, nofollow.site/articles/, even when unlisted generation is disabled.tools/theme-menu.html, with or without
theme-. Default: public everforest-hard-dark;
release solarized-dark.off: no mode control; use the selected theme unchanged.
exact, auto, light, or
dark: show all four controls and select that initial mode.
Default: public exact; release off.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 by DEFAULT_THEME_MODE.square, soft, rounded, or
round. Applies across controls, highlights, blocks, images,
and popovers. Default: public soft; release square.0 to 100 percent
in steps of 10. Default: 30. Its selector appears above
Corners when SITE_BACKGROUND=true.data-auto-light and
data-auto-dark on theme inputs in tools/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.styles.css maps them
to interface and syntax roles, without colour mixing or contrast adjustment.favicon.svg. Default: public
articles/arachnopress/arachnogoatsundual.svg; release empty.true: embed and theme the header SVG; requires
SITE_ICON_PATH. false: display it as an external
image. The favicon always keeps its original colours.
Default: public true; release false.SITE_ICON_PATH is empty. Default: public U+4DEA; release U+4DD6.#rgb or #rrggbb override 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..svg files; do not use the generated favicon.svg.class="colour-out"
and class="colour-in" attributes to drawable elements or
groups. Edit the SVG directly or use Inkscape's XML Editor.colour-out with the article background and
colour-in with its title colour. The mapping follows the
active theme and mode. Avoid inline style declarations that override those fills.SITE_ICON_PATH= and
SITE_ICON_PATH_THEME=false.true; release false.articles/arachnopress/arachnogoatsundual.svg.true (default): browsers supporting CSS random()
choose a scale and crop on document load. Unsupported browsers, or
false, retain the SVG's base fit.colour-in with the theme's background
artwork colour; colour-out is unpainted.
DEFAULT_BACKGROUND_OPACITY controls opacity.preserveAspectRatio="xMidYMid slice" for a centred
cover crop, as in the bundled SVG.pygments (default), source-highlight, or
none. See Code blocks under GENERATED BLOCKS.23; blocks at or below it omit the footer.Create custom-styles.css in the project root for site-local styling:
build and full copy it unchanged when present;
release excludes it. It must be a readable regular file,
not a symlink.feed.atom, discovery metadata, and the header's
Atom link. Default: public true; release false.https://arachnogoat.com; release empty.musol@arachnogoat.com;
release SITE_TITLE.
Enable SITE_FEED, set the feed identity, and opt listed
articles in with data-feed-sections:
h2, adding a linked list of that section's h3 headings.h2/h3 fall back to h1 when the
article has no sections. An h3 entry without child headings
contains only its section link. Section entries do not include article prose.h1 uses the effective
article modification date; section entries use their effective
h2 date, including newer child dates.auto date participates in whole-article
entries. For section entries, it is only the fallback for an undated
h2.SITE_MODE and SITE_URL_STYLE.
IDs remain SITE_URL/#article-id or SITE_URL/#section-id,
independent of dates and output mode.SITE_URL changes IDs.h3 links retain
the parent entry ID. Switching to section mode introduces existing
sections as entries. Read/unread status is controlled by the reader.site/ without changing relative paths.file:// access, open site/index.html;
multi-page navigation requires SITE_URL_STYLE=html..atom as application/atom+xml..html files.
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.
reply: optional address, maximum 254 characters.
message: required, maximum 500 characters.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 becomes arachnopress.arachnogoat_contact=1 for public
builds and arachnopress_contact=1 for releases.These targets package the generator; routine site updates use make build.
arachnopress; archive names remain arachnopress.1.0.70.articles/arachnopress with
RELEASE_FILES, leaving a working release tree in
site/. Creates arachnopress_VERSION.tar.gz at
the project root, under a matching top-level directory. Its own download
is absent inside that tree/archive.RELEASE_FILES and installs the archive into the staged
generator article. Leaves that complete tree in site/.data-release="generator" download marker.arachnopress_*.tar.gz from the source
generator article directory after publication. Other root archives remain.build uses RUNTIME_FILES and all articles;
it leaves source download markers and archives unchanged.GENERATOR_VERSION and run make release.articles/arachnopress/, then
run make build to publish it with other articles.
Alternatively, make full integrates it into staged output.site/. Publication replaces the old output directory..site-build.*
under the project root and static-site-build.* under
TMPDIR before removing leftovers.site/ to discard generated
output; remove obsolete root archives by exact filename.make release with the same version before
make full, from the same source root.data-listed="true"
or no data-listed attribute.static-site-build.* rendering directories;
default /tmp. Target staging uses .site-build.*
beneath the source root.LC_ALL=C; the generator unsets
SOURCE_HIGHLIGHT_DATADIR.tools/build-profile.sh invokes tools/build.sh
with internal BUILD_ROOT and ARTICLE_SELECTION
settings.site/.custom-styles.css from its build root.tools/license.txt.THIRD_PARTY_NOTICES.txt and licenses/.
The license and Theme popovers link to those notices.