jbake
jbake copied to clipboard
.htaccess files disppear from content directory in output
The docs section 5.2.1 state
Any files other than above listed content files, will be treated as static files. When site is baked, all these files will be copied as-is to output folder, while maintaining their directory structure. For example, /content/blog/2013/images/abc.jpg will be copied to to /output/blog/2013/images/abc.jpg.
However, given a content
directory that contains:
- .htaccess
- something.adoc
- image.png
It outputs:
- something.html
- image.png
The .htaccess
file disappears. I'd argue it shouldn't. Or the docs should motivate why it disappears.
Ah, this explains what's happening, section 5.4.2.
All hidden files from content directory are ignored by JBake.
That should be in the content directory section, I'd argue.
Is there a way to allow .htaccess to be copied over the in content directory?
Workaround: Place it in the assets directory. That feels a bit clumsy because my assets directory contains general things (like CSS and JS etc) and my content directory contains the non-general things such as the use case directory which each use case, etc. Those .htaccces files really belong next to the content that they affect (for example renaming foo.html into bar.html)
Would be nice to have freemarker for your htaccess as well, which makes it non-static again... ;-)
Related: https://github.com/jbake-org/jbake/issues/751