Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.htaccess files disppear from content directory in output #688

Open
ge0ffrey opened this issue May 11, 2021 · 5 comments
Open

.htaccess files disppear from content directory in output #688

ge0ffrey opened this issue May 11, 2021 · 5 comments

Comments

@ge0ffrey
Copy link
Contributor

ge0ffrey commented May 11, 2021

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.

@ge0ffrey
Copy link
Contributor Author

ge0ffrey commented May 11, 2021

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.

@ge0ffrey
Copy link
Contributor Author

Is there a way to allow .htaccess to be copied over the in content directory?

@ge0ffrey
Copy link
Contributor Author

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)

@bmarwell
Copy link

Would be nice to have freemarker for your htaccess as well, which makes it non-static again... ;-)

@bmarwell
Copy link

Related:
#751

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants