pipeline.ori: pull initial pipeline apart to avoid double running of pipeline
This commit is contained in:
parent
ff744555e3
commit
c55e106cdb
|
|
@ -5,7 +5,6 @@
|
||||||
server or copy site.ori to build final output.
|
server or copy site.ori to build final output.
|
||||||
*/
|
*/
|
||||||
(all) => {
|
(all) => {
|
||||||
//put the file selection part in a closure, so that the list of all files is kept private.
|
|
||||||
/*
|
/*
|
||||||
list is all the files in current directory.
|
list is all the files in current directory.
|
||||||
allfiles is all source files: ending with `.md` and not starting with `_`.
|
allfiles is all source files: ending with `.md` and not starting with `_`.
|
||||||
|
|
@ -24,15 +23,15 @@
|
||||||
// pubfiles: pubfiles.sh(allfiles)
|
// pubfiles: pubfiles.sh(allfiles)
|
||||||
(list): ..
|
(list): ..
|
||||||
allfiles: Tree.filter(list, (val, key) => key.endsWith('.md') && !key.startsWith('_'))
|
allfiles: Tree.filter(list, (val, key) => key.endsWith('.md') && !key.startsWith('_'))
|
||||||
→ (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!
|
documents: Tree.map(allfiles, {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)})
|
withfndata: Tree.map(documents, { value: (value, key) => addFilenameData.js(value, key)})
|
||||||
|
|
||||||
pubfiles: Tree.filter(allfiles, (val, key) => val.fnd.tags?.includes('pub'))
|
pubfiles: Tree.filter(withfndata, (val, key) => val.fnd.tags?.includes('pub'))
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Now convert to html.
|
Now convert to html.
|
||||||
*/
|
*/
|
||||||
asHtml: Tree.map(all ? allfiles: pubfiles, {
|
asHtml: Tree.map(all ? withfndata: pubfiles, {
|
||||||
value: (value) => Origami.mdHtml(value)
|
value: (value) => Origami.mdHtml(value)
|
||||||
key: (value, key) => `${value.fnd.name}.html`
|
key: (value, key) => `${value.fnd.name}.html`
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue