Module

jinks/author

src/jinks/author.pooka

A new page starts as a draft, with its date written down rather than guessed later. This command changes source content only. It does not build the site or quietly replace a notebook that somebody has already opened.

API reference

function

run

src/jinks/author.pooka:26
run(values: List(String)) -> Result(String, String)
INFERREDfn(List(String)) -> Result(String, String)

Paths are relative to content/, not to the command's working directory.

sh
jinks new posts/the-small-hours /path/to/site --title "The small hours"
function

filename_for

src/jinks/author.pooka:75
filename_for(value: String) -> Result(String, String)
INFERREDfn(String) -> Result(String, String)

Validate before normalising or adding an extension: a parent segment must not disappear into a seemingly innocent filename. Unicode names use NFC.

function

source

src/jinks/author.pooka:96
source(title: String, day: String, layout: Option(String)) -> Result(
  String,
  String
)
INFERREDfn(String, String, Option(String)) -> Result(String, String)

JSON's quoted string encoding is also a valid TOML basic string here. It keeps quotes and backslashes in a title from becoming new metadata fields. Titles stay on one line, both in the envelope and in the Markdown heading.

Pooka
let assert Ok(page) = author.source("A small beginning", "2024-02-29", None)
function

available

src/jinks/author.pooka:123
available(root: String, name: String) -> Result(Nil, String)
INFERREDfn(String, String) -> Result(Nil, String)
function

comparable

src/jinks/author.pooka:137
comparable(value: String) -> String
INFERREDfn(String) -> String
function

help

src/jinks/author.pooka:141
help() -> String
INFERREDfn() -> String