{ //put the file selection part in a closure, so that the list of all files is kept private. /* select markdown files not beginning with `_`, force contents to Document, and add data parsed from filename. */ allfiles: Tree.filter(., (val, key) => key.endsWith('.md') && !key.startsWith('_') && key !== 'README.md') → (items) => Tree.map(items, {value: (value) => Origami.document(value)}) //if I don't use the verbose syntax I get the filename characters as part of value! → (items) => Tree.map(items, {value: (value, key) => addFilenameData.js(value, key)}) /* Now convert to html. */ asHtml: Tree.map(allfiles, { value: (value) => Origami.mdHtml(value) key: (value, key) => `${value.fnd.name}.html` }) renderedPages: Tree.map(asHtml, (page) => (page)) /* Now, I think I have enough to build both the individual pages and the index page! */ index.html: indexPage.ori(asHtml) ...renderedPages }