Module

jinks/route

src/jinks/route.pooka

Give each page an address before any files are written. Keeping this calculation pure makes collisions something we can catch at the door.

API reference

function

output

src/jinks/route.pooka:15
output(relative: String) -> Result(String, String)
INFERREDfn(String) -> Result(String, String)

notes/owl.md becomes notes/owl/index.html; an index keeps its seat.

function

url

src/jinks/route.pooka:33
url(output: String) -> String
INFERREDfn(String) -> String
function

permalink

src/jinks/route.pooka:50
permalink(value: String) -> Result(String, String)
INFERREDfn(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.

function

checked

src/jinks/route.pooka:90
checked(relative: String) -> Result(String, String)
INFERREDfn(String) -> Result(String, String)
function

template_output

src/jinks/route.pooka:106
template_output(source: String) -> Result(String, String)
INFERREDfn(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.