mrvautin / squido

A dead simple static HTML website builder which can be hosted anywhere for super fast websites and very little effort
https://squido.markmoffat.com/
MIT License
63 stars 6 forks source link

Ability to organize posts in subfolders #16

Closed ricardonunesdev closed 2 years ago

ricardonunesdev commented 2 years ago

Hey @mrvautin,

Is it possible to implement the ability to allow markdown files in subfolders of /posts?

I changed line 11 of lib/source.js from this:

const sourceFiles = await glob(`${winPath(dir)}/*.${process.config.sourcesExt || 'markdown'}`);

to this (notice the double asterisks in the path):

const sourceFiles = await glob(`${winPath(dir)}/**/*.${process.config.sourcesExt || 'markdown'}`);

And now it allows me to organize the files in subfolders (like blog, pages, projects, docs, etc).

Is this something you're willing to add to the core of squido? Do you want me to submit a PR for this?

Best regards, Ricardo

mrvautin commented 2 years ago

I like this idea. There are a few things to consider. I will merge some code shortly enabling this.