JSRocksHQ / harmonic

The next static site generator
http://harmonicjs.com/
MIT License
282 stars 26 forks source link

Where to place auxiliary files for posts #138

Closed soapdog closed 9 years ago

soapdog commented 9 years ago

Where should I place auxiliary files for posts such as images and downloadable content? Since the public folder is overwritten every time I run the build/run command I am not sure where to place such content.

Shouldn't we have a merge folder that on build would be copied to public much like theme developers do? Without this, harmonic users will need to change the theme node module to carry their files...

Should I do a PR?

jaydson commented 9 years ago

That's makes sense. You mean files not related to the theme, right?

I think we lost this feature when we split themes outside harmonic's core. Do you have a working branch with such feature?

//cc @UltCombo

UltCombo commented 9 years ago

@jaydson We could add a src/resources directory which gets copied over to public/resources on build. Perhaps we could even do it in the existing copyResources method.

What do you think?

jaydson commented 9 years ago

Yep, should work. But perhaps, we should copy src/resources/* to public/*. I mean, just copy resources content.

UltCombo commented 9 years ago

@jaydson sounds good. :D

UltCombo commented 9 years ago

And we should copy it after building everything and copying the theme files, so that any of the generated/theme files can be overwritten with a custom user resource.

UltCombo commented 9 years ago

Then it may make sense to split the copying in two methods: copyThemeResources and copyCustomResources (or copyUserResources)

jaydson commented 9 years ago

Good approach :)

soapdog commented 9 years ago

Yep, that sounds good to me. :+1:

jaydson commented 9 years ago

@soapdog

Do you have a working branch with such feature?

soapdog commented 9 years ago

Not yet but I can do it today and send a new PR if you guys want....

UltCombo commented 9 years ago

Fixed by #141, available since v0.3.0