Origami namespace

General Origami language functions

Commands by name #

Origami.basename(key)
Removes an extension from the key if present
Origami.config
The current project’s configuration
Origami.csv(tree)
Render the tree as a CSV file
Origami.document(text, [data])
Create a document object with the text and data
Origami.extension
Helpers for working with file extensions
Origami.image
Collection of functions for working with images
Origami.indexPage(tree)
A default index.html page for the tree
Origami.inline(text)
Inline Origami expressions found in the text
Origami.jsonKeys(tree)
Add .keys.json files to a tree
Origami.jsonParse(text)
Parse text as JSON
Origami.mdHtml(markdown)
Render the markdown as HTML
Origami.naturalOrder
A comparison function for natural sort order
Origami.once(fn)
Run the function only once, return the same result
Origami.ori(text)
Evaluate the text as an Origami expression
Origami.post(url, data)
POST the given data to the URL
Origami.project
The root folder for the current Origami project
Origami.redirect(url, options)
Redirect to the given URL
Origami.repeat(n, obj)
An array of n copies of the object
Origami.rss(feed)
Transforms a JSON Feed tree to RSS XML
Origami.shell(text)
Run the text as a shell command, return the output
Origami.sitemap(tree)
Generate a sitemap for the tree
Origami.slash
Helpers for working with trailing slashes
Origami.slug(text)
A version of the text suitable for use in URLs
Origami.static(tree)
Define common static files for the tree
Origami.string(obj)
Coerce a buffer or document to a string
Origami.toFunction(obj)
Coerce a tree or packed function definition to a function
Origami.unpack(buffer)
Unpack the buffer into a usable form
Origami.yaml(obj)
Render the object in YAML format
Origami.yamlParse(text)
Parse text as YAML