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

Jekyll won't generate "dot" files #742

Closed
jacobthurman opened this issue Jan 7, 2013 · 12 comments

Comments

Projects
None yet
8 participants
@jacobthurman
Copy link

commented Jan 7, 2013

Jekyll won't generate filenames that start with a dot (e.g. .htaccess). It fails in two scenarios:


First:

_config.yml contains the option:
include:
- .htaccess

A file called .htaccess will not be generated in this case.


Second:
A file called htaccess (no dot) has the following front matter:
---
permalink: .htaccess
---

A file called .htaccess is not generated in this case.


Oddly, if I have the _config option above, and then put the following front matter in a file called .htaccess (with the dot), the file is generated as expected (with no dot):
---
permalink: htaccess
---

@matthodan

This comment has been minimized.

Copy link

commented Jan 8, 2013

Along these lines, I think Jekyll would benefit from better separation of content vs configuration/construction assets. Perhaps add a source directory to store all content assets that are processed by Jekyll and keep configuration/construction assets outside of this directory. This might even allow us to abandon the whole underscore prefix convention.

@mccxj

This comment has been minimized.

Copy link
Contributor

commented Jan 10, 2013

try to use the config:
include: [".htaccess"]

but it's NOT a good choose! keep content seperate from config files:(

@parkr

This comment has been minimized.

Copy link
Member

commented Jan 10, 2013

.htaccess files are included by default, so you don't need to include it in your _config.yml. I'll take a closer look at the Page class – it may not support dotfiles. I'll add work on adding tests.

@parkr

This comment has been minimized.

Copy link
Member

commented Jan 10, 2013

Test for dotfiles written and passes for me. Please make sure you're up-to-date (running Jekyll 0.12.0).

Would you mind pulling a copy of Jekyll down and running rake test in the command line? If the test fails then it's a problem with your version of Ruby or a language-level configuration.

@parkr parkr closed this Mar 19, 2013

@htmelvis

This comment has been minimized.

Copy link

commented Sep 2, 2015

I have noticed that in v. 2.5.3 that my dotfile (.htaccess) is generated as a normal file and included in the compilation. Once added to the exclude the .htaccess is still compiled and placed in the destination dir. Has anyone else experienced this?

The docs: http://jekyllrb.com/docs/configuration/ state that dotfiles are excluded by default. I have found this not to be the case with my .htaccess file.

@jaybe-jekyll

This comment has been minimized.

Copy link
Member

commented Sep 2, 2015

.htaccess is a default include value.

Perhaps that takes precedence; consider, in _config.yml:

include: ""

@htmelvis

This comment has been minimized.

Copy link

commented Sep 2, 2015

That seems a bit odd to do and the docs state:
screen shot 2015-09-02 at 12 57 04 pm

It also seems that no matter included or excluded the file is still compiled and placed in the destination:

@jaybe-jekyll

This comment has been minimized.

Copy link
Member

commented Sep 2, 2015

I agree; I do not think .htaccess (or anything) should be included by default.

I could see at some point why it may have been added in order to alleviate inquiries.

Are you using jekyll v3.* with regeneration? Try building with a full rebuild to ensure you're not seeing ghosts.

@parkr

This comment has been minimized.

Copy link
Member

commented Sep 2, 2015

I agree; I do not think .htaccess (or anything) should be included by default.

Someone want to submit a PR and research the reasoning for adding it in the first place? Probably somewhere in our Git history.

@htmelvis

This comment has been minimized.

Copy link

commented Sep 2, 2015

I'm on (2.5.3) I have simply removed .htaccess from the project and placed in a deployment config file because I cannot have my htaccesses swapping at staging/live.

I have no problem looking for it.

@htmelvis

This comment has been minimized.

Copy link

commented Sep 2, 2015

I think this may be it...
screen shot 2015-09-02 at 2 18 10 pm

@envygeeks

This comment has been minimized.

Copy link
Contributor

commented Sep 2, 2015

Edit: Didn't see that @parkr took up the issue. Sorry.

@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.