Find the markdown pages in the given directory, searched recursively.
SSG
:= []
Static site generation effects: discover page sources, run application-defined decoders, optionally render Markdown, and write generated files to disk.
pages_with! : { input_dir : Path, source_extension : Str } => Try(List(Page), [PagesError(Str), ..])
Find pages with source_extension in the given directory, searched recursively.
The extension must not include a leading dot. Output paths always use .html.
read_source! : Page => Try(Str, [ReadError(Str), ..])
Read a page source as UTF-8 text.
decode_page! : Page, ({ page : Page, source : Str } => Try(value, [ReadError(Str), ..err])) => Try(value, [ReadError(Str), ..err])
Read a page source and run a pure or effectful decoder against it.
parse_markdown! : Path => Try(Str, [ParseError(Str), ..])
Render a markdown file to an HTML string.
Render Markdown source to HTML. Replacement directives are resolved relative
to source_path, which normally identifies the page being decoded.
write_file! : { output_dir : Path, output_path : Path, content : Str } => Try({ }, [WriteError(Str), ..])
Write content to output_path underneath output_dir, creating parent directories as needed.
A page source discovered under the input directory.
- source_path is the application-defined page source file.
- output_path is relative to the output directory, with extension rewritten to .html.
- url is the site-absolute URL of the output file.