Filename with dot in front aren't synced anymore #363

oliparcol opened this Issue Jul 14, 2011 · 12 comments


None yet

10 participants


Filename with a dot in front (mainly important for .htaccess files) aren't synced anymore in jekyl 0.11.0.


bzimmer commented Jul 15, 2011

I have the issue. I'm using:

$ ruby -v
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]

When I rolled back to 0.10.0 all is working again.

thanks, brian


I noticed this too; my personal branch has a fix at belkadan@f5c5b42.


Same thing here.

My setup is as follows:

ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]
jekyll 0.11.0

From _config.yml
source: .
destination: ../html
plugins: ./_plugins

I have a .htaccess sitting in the source directory. When jekyll 0.11 builds the site, the .htaccess file is not moved. Additionally, if an .htaccess file was moved manually to the destination (e.g. ../html) directory, it gets removed when jekyll is run.


Incidentally, jekyll is my first ruby experience. If someone wouldn't mind telling me an easy way to roll back to version 0.10 I would greatly appreciate it (as it would save me some googleing or stackoverflowing and let me get back to messing with jekyll itself).


bzimmer commented Jul 17, 2011

You can try (I use a mac):

sudo gem uninstall -v 0.11.0 jekyll
sudo gem install -v 0.10.0 jekyll


Thank you, @bzimmer. That worked great.


sumbach commented Jul 21, 2011

This looks like the culprit: 13cc44f#L2L213

Dir.entries includes dotfiles (e.g., .htaccess), Dir['*'] does not.

jnrbsn commented Aug 8, 2011

@sumbach I apologize if this is a dumb question, but do you know if reverting line 213 of lib/jekyll/site.rb (the line to which you're referring in the commit to which you linked) would break anything else?

sumbach commented Aug 8, 2011

@jnrbsn Looking at the filter_entries code, I suspect that does not exclude any dotfiles if you revert line 213. I think you'd need to use File.basename(e) to get the desired exclusion of dotfiles and exclusions from your config file.

It would be awesome to put a test suite in place to characterize the current behavior and clarify what's wrong about it. If you don't get to it before then, I'll plan on building a test suite this Friday.

Juev commented Aug 9, 2011

I went a little easier. Created the file htaccess, without a dot at the beginning of the file name with the following contents:

layout: none
permalink: .htaccess
Redirect 301 /linode

And now, the generation of the site is created the file.


@Juev - That's a great idea. Even if when the issue is fixed I'm going to keep doing that just to make the file show up in the Mac Finder window without having to show all hidden files. Very nice.


@Juev - Bingo. So simple...should have thought of it myself. :) Thanks!

@mojombo mojombo added a commit that closed this issue Jan 23, 2012
@mojombo mojombo Properly select dotfiles during directory scan.
Fixes #363.
Fixes #431.
Fixes #377.
@mojombo mojombo closed this in 9d70088 Jan 23, 2012
@jekyllbot jekyllbot 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.