Fix pretty permalinks in server auto #691

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
7 participants
Owner

parkr commented Dec 18, 2012

Implementation of #219 for posts, not just pages.

Owner

mattr- commented Dec 19, 2012

👍

Owner

parkr commented Dec 19, 2012

I feel like there are more tests I need to write.

Owner

mattr- commented Dec 19, 2012

coverage looks good to me. the only thing I would do is to run it through a coverage tool and double check.

Owner

mattr- commented Apr 14, 2013

this will need to be updated when/if we merge #963

Owner

parkr commented Apr 22, 2013

Do we care about this anymore? Seems like almost no one is interested in this functionality

Contributor

AlexanderEkdahl commented Apr 22, 2013

What is this and what does it have to do with server auto?

lenidot commented Apr 22, 2013

I'm interested in it.

My /blog currently hardcodes this feature, so index.html:

< a href="/blog{{ post.url | remove:'.html' }}">{{ post.title }}

@kelvinst kelvinst commented on the diff Jul 10, 2013

lib/jekyll/post.rb
@@ -202,7 +204,7 @@ def render(layouts, site_payload)
def destination(dest)
# The url needs to be unescaped in order to preserve the correct filename
path = File.join(dest, CGI.unescape(self.url))
- path = File.join(path, "index.html") if template[/\.html$/].nil?
+ path = File.join(path, "index.html") if template[/\.html$/].nil? && self.site.permalink_style != :pretty_flat
@kelvinst

kelvinst Jul 10, 2013

Maybe the condition could be unless template.end_with?(".html") || self.site.permalink_style == :pretty_flat, is more readable this way to me

parkr closed this Mar 17, 2014

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.