pipeline.ori: remove slash from key passed to addFilenameData.js

This commit is contained in:
Hans Fast 2026-03-18 15:55:02 +01:00
parent c55e106cdb
commit ad9f56baac
2 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,10 @@
import {parse} from './filenameparser.js';
export default (value, key) => {
/*
* debug: log the key to see if it's getting a trailing slash
*/
//console.log(`key: ${key}`);
const fnd = parse(key);
return {...value, fnd};
}

View File

@ -24,7 +24,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!
withfndata: Tree.map(documents, { value: (value, key) => addFilenameData.js(value, key)})
withfndata: Tree.map(documents, { value: (value, key) => addFilenameData.js(value, Origami.slash.remove(key))})
pubfiles: Tree.filter(withfndata, (val, key) => val.fnd.tags?.includes('pub'))