stebrech / notion2eleventy

notion2eleventy is an Eleventy plugin which downloads content from Notion depending on a defined status.
https://www.npmjs.com/package/@stebrech/notion2eleventy
MIT License
6 stars 0 forks source link

Slug in downloadPaths #1

Open jurbank opened 1 month ago

jurbank commented 1 month ago

Would be nice to be able to do something like this:

downloadPaths: { md: "content/blog/{slug}",

I'm trying to stick with the structure from the 11ty blog starter template: https://github.com/11ty/eleventy-base-blog image

Currently, all of the images and md are seperate when seems to throw build errors when transforming from .md to .html

stebrech commented 3 weeks ago

Hi @jurbank, thanks for your feature request. Please test and review the pull request Dynamic slug subfolders

stebrech commented 3 weeks ago

You can edit your config with something like that:

        downloadPaths: {
            md: "src/blog/",
            mdSlugSubfolder: true,
            img: "src/blog/",
            imgSlugSubfolder: true,
            movie: "src/blog/",
            movieSlugSubfolder: true,
            pdf: "src/blog/",
            pdfSlugSubfolder: true,
        },
        markdownPaths: {
            img: "./",
            movie: "./",
            pdf: "./",
        },