Hwaro::Models::StaticConfig
Inherits Reference / Object
[static] — controls which files under static/ get published.
static/ is copied verbatim into the site root, so OS/editor/VCS cruft
placed there (.DS_Store, Thumbs.db, .git/, vim swap files, …) would
otherwise be deployed. A built-in denylist filters the common offenders;
exclude adds project-specific patterns — a glob like *.bak filters at
any depth, drafts/** scopes a subtree, and a literal name is anchored to
an exact file or directory (drafts drops drafts/…) — and
use_default_excludes = false opts out of the built-in list entirely.
Note: this only filters cruft. Legitimate dot-paths such as
.well-known/ are NOT in the denylist and are always published.
Constants
Exact file/dir names that should essentially never be published.
Matched per path segment, so an entry like .git filters that
directory (and everything under it) at any depth.
Suffixes for vim swap files, matched against the leaf file name only.
Kept deliberately narrow: a name ending in .swp/.swo is never a
legitimate published asset, so the always-on default denylist can't
silently drop real content. Emacs-style ~ backups are intentionally
NOT here — a trailing tilde is a legal file name, so filtering it is
left to an explicit exclude pattern.
Glob metacharacters that distinguish an exclude glob from a literal
path/name.
Constructors
Instance methods
Whether relative_path (relative to static/) should be filtered out
of the published output.
exclude entries match two ways depending on their shape:
- a glob (contains
* ? [ {) matches the relative path, and — when it has no/— the bare file name too, so*.bakfilters at any depth whiledrafts/**scopes to a subtree; - a literal is anchored: it matches that exact path or, when it names a
directory, the whole subtree under it. So
draftsdropsdrafts/...butconfigonly drops a top-levelconfig, never a same-named file nested elsewhere.