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
64 stars 6 forks source link

Ability to change the "content" folder in the config file #15

Closed ricardonunesdev closed 2 years ago

ricardonunesdev commented 2 years ago

Hey @mrvautin,

Just found out about squido and already love it, thank you for making such an awesome product.

I have a few requests though (which I'll split up into multiple issues to help you with tracking).

The first one is if you could add the ability to change the content folder in the config file. I usually call this folder assets but there is no way to change it.

I checked your lib/build.js file and the folder name is hardcoded there (lines 466 and 468):

// Copy the content. Images, Stylesheets, JS etc
const copyContent = async () => {
    const contentDir = path.join(process.config.sourceDir, 'content');
    const contentFiles = await glob(`${winPath(contentDir)}/*/**`);
    const buildContent = path.join(process.config.buildDir, 'content');

    ...

There are many other variables set up in the config file, maybe this could also be one of them, with content as the default value.

Also I don't know if you prefer to make the change yourself or let contributors submit PRs, let me know.

Best regards, Ricardo

mrvautin commented 2 years ago

Great idea, thanks for your interest and input. I've added in 641cf52. Let me know if you have any issues or feedback.