diff --git a/pipeline.ori b/pipeline.ori index af08aee..afdf311 100644 --- a/pipeline.ori +++ b/pipeline.ori @@ -26,7 +26,7 @@ (list): .. allfiles: Tree.filter(list, (val, key) => key.endsWith('.md') && !key.startsWith('_')) 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! - withfilenamedata: Tree.map(documents, { value: (value, key) => addFilenameData.js(value, Origami.slash.remove(key))}) + withfilenamedata: Tree.map(documents, { value: (value, key) => ./filenamedata/addFilenameData.js(value, Origami.slash.remove(key))}) //files now have a key `fnd` for 'filenamedata`. This contains address, title, and tags parsed from the filename. pubfiles: Tree.filter(withfilenamedata, (val, key) => val.fnd.tags?.includes('pub')) @@ -45,18 +45,18 @@ and ends up in a separate field of the document. So we dont have to worry about the title being part of the summary. */ - withSummary: Tree.map(asHtml, extractSummary.js) + withSummary: Tree.map(asHtml, ./html-manipulations/extractSummary.js) /* Removing private content coming below the html paragraph `

—private-below—

` Only remove this if in public mode. So if this file is called as `site.ori("all")`, then final output is `withSummary`, otherwise it's `privateRemoved`. */ - privateRemoved: Tree.map(withSummary, removePrivate.js) + privateRemoved: Tree.map(withSummary, ./html-manipulations/removePrivate.js) final: (all ? withSummary : privateRemoved ) renderedPages: Tree.map(final, {value: (page) => { - html: (page, all) + html: (page, all) ...page }}) /* @@ -64,14 +64,14 @@ */ //NOTE! two steps at once. Could separate the withTranslations part: add a html_LANG property to the document object, then later create the folder structure. - pagesInFolders: Tree.map(renderedPages, pagesInFoldersWithTranslations.js) + pagesInFolders: Tree.map(renderedPages, ./translations/pagesInFoldersWithTranslations.js) - linksByFile: Tree.map(Tree.map(renderedPages, (a) => a/html), getLinkedFilesFromHtml.js) + linksByFile: Tree.map(Tree.map(renderedPages, (a) => a/html), ./linked-files/getLinkedFilesFromHtml.js) uniqueLinks: Tree.flat(linksByFile) → (a) => [...new Set(a)] - linksAsTree: pathsToObjs.js(uniqueLinks) + linksAsTree: ./linked-files/pathsToObjs.js(uniqueLinks) onlyLinkedFiles: Tree.mask(list, linksAsTree) - index.html: indexPage.ori(final, all) + index.html: ori-templates/indexPage.ori(final, all) ...onlyLinkedFiles } diff --git a/translations/pagesInFoldersWithTranslations.js b/translations/pagesInFoldersWithTranslations.js index d29a939..3412ab7 100644 --- a/translations/pagesInFoldersWithTranslations.js +++ b/translations/pagesInFoldersWithTranslations.js @@ -28,7 +28,6 @@ export default async (page) => { //this is going to create a folder for each 'translation' specified in frontmatter. function handleTranslations(html, trls) { if (trls) { - console.log(trls); const outputs = {}; trls.forEach(trl => { outputs[trl] = { @@ -41,7 +40,7 @@ function handleTranslations(html, trls) { } } -//"reorders" all `trl-group`s so the element with given lang is displayed. +//modifies all `trl-group`s so the element with given lang is displayed. //EN is default language ... //also adds a (hidden by css) trl-selector at the top of `body`. //TODO: add a link to translated pages ...