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

Fix pretty permalinks in server auto #691

Closed
wants to merge 1 commit into from
Closed

Fix pretty permalinks in server auto #691

wants to merge 1 commit into from

Conversation

parkr
Copy link
Member

@parkr parkr commented Dec 18, 2012

Implementation of #219 for posts, not just pages.

@mattr-
Copy link
Member

mattr- commented Dec 19, 2012

👍

@parkr
Copy link
Member Author

parkr commented Dec 19, 2012

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

@mattr-
Copy link
Member

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.

@kevinSuttle
Copy link

+1

@mattr-
Copy link
Member

mattr- commented Apr 14, 2013

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

@parkr
Copy link
Member Author

parkr commented Apr 22, 2013

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

@AlexanderEkdahl
Copy link
Contributor

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

@lenidot
Copy link

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 }}

@@ -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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@parkr parkr closed this Mar 17, 2014
@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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants