Module

jinks/helpers

src/jinks/helpers.pooka

Templates borrow small, deterministic helpers rather than a filesystem or a network client. Asset fingerprints are prepared once by the build; a template cannot turn an asset name into an arbitrary file read.

API reference

function

install

src/jinks/helpers.pooka:23
install(
  library: tuck.Library,
  site: config.Config,
  clock: String,
  assets: List(#(String, String))
) -> Result(tuck.Library, String)
INFERREDfn($package/tuck/tuck.Library, jinks/config.Config, String, List(#(String, String))) -> Result($package/tuck/tuck.Library, String)
function

text

src/jinks/helpers.pooka:78
text(value: json.Json, run: fn(String) -> Result(json.Json, String)) -> Result(
  json.Json,
  String
)
INFERREDfn($package/pooka_json/pooka/json.Json, fn(String) -> Result($package/pooka_json/pooka/json.Json, String)) -> Result($package/pooka_json/pooka/json.Json, String)
function

relative

src/jinks/helpers.pooka:88
relative(base: String, url: String) -> Result(String, String)
INFERREDfn(String, String) -> Result(String, String)
function

reading_time

src/jinks/helpers.pooka:107
reading_time(source: String) -> Int
INFERREDfn(String) -> Int
function

format_date

src/jinks/helpers.pooka:118
format_date(source: String, short: Bool) -> Result(String, String)
INFERREDfn(String, Bool) -> Result(String, String)
function

minutes

src/jinks/helpers.pooka:147
minutes(words: Int, total: Int) -> Int
INFERREDfn(Int, Int) -> Int
function

with_samples

src/jinks/helpers.pooka:156
with_samples(library: tuck.Library, root: String) -> Result(
  tuck.Library,
  String
)
INFERREDfn($package/tuck/tuck.Library, String) -> Result($package/tuck/tuck.Library, String)

Samples are author-selected source files beneath a dedicated root. No host function exposes an arbitrary read capability to a template.