oleeskild / digitalgarden

275 stars 158 forks source link

dataviewJS file.path not detected by sluggify #207

Open jonathanhung opened 11 months ago

jonathanhung commented 11 months ago

when using dataviewJS file.path, the paths are rendered as .md and never get updated.

    const dataviewUtils = require(app.vault.adapter.basePath + "/999 Meta/050 Files/dataviewUtils.js");

    const postTitles = dv.pages('"200 Posts"').file.name;
    const postPaths = dv.pages('"200 Posts"').file.path;

    function makeElement(path) {
        dv.el("a", "this is some text", { attr: { href: path } });
        }

    postPaths.forEach(makeElement);

Returns a link to a markdown file: image

Using dataview LIST gets correctly sluggified.