Hwaro::Services::Exporters::Base
Constants
index.md, _index.md and their translations: the pages whose
directory is a bundle (or section) with files of its own.
Project directories that hold SOURCES, never export output. The
exporters write each file with a plain File.write, so a destination
that lands on one of these rewrites the project in place — front
matter re-serialized into the target's dialect, comment lines
dropped, @/page.md internal links flattened — with no backup and
exit 0. Matching is on the RESOLVED path, so a destination that
merely shares a prefix with one of these names (-o contents,
-o static-site) is unaffected.
A reference-style link definition ([ref]: @/posts/a.md "Title"),
which the build resolves exactly like an inline link.
Class methods
Reject an export destination that isn't a safe place to write into.
hwaro build has guarded its -o since it started wiping the
directory (Phases::Initialize#guard_output_dir!), but tool export
had no check at all: hwaro tool export hugo -o . resolved every
destination straight back onto the source file it had just read and
overwrote the whole of content/, reporting success.
Unlike the build guard this one deliberately PERMITS a repository
root and a non-empty directory: exporting into a sibling checkout
(-o ../my-hugo-site) is the entire point of the command.
Instance methods
When set, the run resolves and reports every destination (counts, manifest) but writes nothing to disk.
When set, the run resolves and reports every destination (counts, manifest) but writes nothing to disk.
Per-file manifest of this run, in write order. Unlike import, an
export OVERWRITES an existing destination by design (re-exporting
into the same directory is the normal refresh workflow) — the
manifest marks those rows overwritten so the caller can see
exactly which pre-existing files a run replaced.