Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Dotfiles are not generated anymore #195

Closed
jlecour opened this Issue · 10 comments

3 participants

@jlecour

Hi,

In a blog managed with 0.5.7, I have an .htaccess in the root directory. It contains some rules depending on the published posts, … and it needs to be parsed and generated into the _site directory.

It was working great until I update to Jekyll 0.6.2 where this file is simply ignored.
I don't know if it's a bug or a new feature/default configuration that I'm not aware of.

Thanks for any help.

Here is my .htaccess file :

---
layout: nil
---
ErrorDocument 404 /404.html
ErrorDocument 500 /500.html
<IfModule mod_rewrite.c>
    RewriteEngine On
{% for post in site.posts %}
    {% if post.post_id != null %}RewriteRule ^r/{{ post.post_id }}/?$ {{ post.url }} [R=301,L]{% endif %}
{% endfor %}
</IfModule>
@jlecour

It still doesn't seem to work with jekyll 0.7

@jlecour

I've made a pull request associated with #210

@stereobooster

solved in #208

@jlecour

I'm sorry, but this doesn't work.

I can see that there is a passing test, but the file is not really generated.

Is there a debug or verbose mode to see why it doesn't generate it ?

@stereobooster

I didn't check it, but relly upon this comment

Maybe jekyll_alias_generator will solve your problem

@jlecour

@stereobooster Thanks for trying to help me with this, but I really need an .htaccess file, not only for a few basic redirections.

And in my case it's an .htaccess file, but it could be any other dotfile that needs to be in the website's directory

@ghost

This has to do with line 315 in lib/jekyll/site.rb. The line excludes all files beginning with ., _, or #.

@jlecour

@dunsmoreb In fact the filter_entries method is indeed filtering such files, but it's also using a global include array of files to, well, include (as in "not exclude") ;-)

I've added this in my _config.yml, and now, it's working :

include:
  - .htaccess
@jlecour

I've just realised that this "include" list is working only in the master branch. The latest release (v0.11.2) doesn't work like this.

I hope @mojombo will release soon to benefit from this new feature.

@qrush

Sounds like this is fixed. Yell if not.

@qrush qrush closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.