Module
jinks/route
src/jinks/route.pookaGive each page an address before any files are written. Keeping this calculation pure makes collisions something we can catch at the door.
API reference
output(relative: String) -> Result(String, String)
INFERRED
fn(String) -> Result(String, String)notes/owl.md becomes notes/owl/index.html; an index keeps its seat.
url(output: String) -> String
INFERRED
fn(String) -> Stringpermalink(value: String) -> Result(String, String)
INFERRED
fn(String) -> Result(String, String)Explicit permalinks name URLs, not arbitrary filesystem paths. Decode once for the output filename, then encode each segment when exposing its URL.
checked(relative: String) -> Result(String, String)
INFERRED
fn(String) -> Result(String, String)template_output(source: String) -> Result(String, String)
INFERRED
fn(String) -> Result(String, String)A standalone page can name its output format: index.html.tuck and feed.xml.tuck retain that extension; about.tuck uses a clean HTML URL.