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

Extensionless URLs #104

Merged
merged 1 commit into from Nov 18, 2015

Conversation

Projects
None yet
4 participants
@mwanji
Contributor

mwanji commented Mar 26, 2014

New property uri.noExtension allows the user to specify a root folder for which "extensionless" URLs will be created. In practice, the file name is used as a folder and the actual file is generated as index.html inside that folder. uri.noExtension defaults to false, which does nothing.

For example:

If uri.noExtension is set to /blog, then after baking, the file /blog/2014/03/26/post.md would become /output/blog/2014/03/26/post/index.html and the URL would be <DOMAIN>/blog/2014/03/26/post.

@mwanji mwanji changed the title from Added option for extensionless URLs to Extensionless URLs Mar 26, 2014

@lefou

This comment has been minimized.

Show comment
Hide comment
@lefou

lefou Mar 27, 2014

Member

Initially, I liked the idea. But, it should come with good documentation of the drawbacks, especially regarding relative links. Although, the page appears to be extention-less, it is really a index.html one level below. There is a miss match between the source and the generated file/dir structure. Without consulting the configuration, it is hard how to proper create a relative link to/from another page.

Member

lefou commented Mar 27, 2014

Initially, I liked the idea. But, it should come with good documentation of the drawbacks, especially regarding relative links. Although, the page appears to be extention-less, it is really a index.html one level below. There is a miss match between the source and the generated file/dir structure. Without consulting the configuration, it is hard how to proper create a relative link to/from another page.

@mwanji

This comment has been minimized.

Show comment
Hide comment
@mwanji

mwanji Mar 27, 2014

Contributor

Personally, I don't use relative links, as it always seems to devolve into a mess. I can see how the extra level makes it a bit more complicated.

One advantage is that it might be easier to migrate to a non-static backend.

Contributor

mwanji commented Mar 27, 2014

Personally, I don't use relative links, as it always seems to devolve into a mess. I can see how the extra level makes it a bit more complicated.

One advantage is that it might be easier to migrate to a non-static backend.

@jonbullock

This comment has been minimized.

Show comment
Hide comment
@jonbullock

jonbullock Apr 8, 2014

Member

I'll have a look at this in greater detail once I'm not so busy, as it relates to another issue to do with relative links.

Member

jonbullock commented Apr 8, 2014

I'll have a look at this in greater detail once I'm not so busy, as it relates to another issue to do with relative links.

@jonbullock jonbullock added this to the v2.5.0 milestone May 13, 2015

@jonbullock

This comment has been minimized.

Show comment
Hide comment
@jonbullock

jonbullock May 13, 2015

Member

I like this idea... not sure if limiting this to just a single folder is the right way to go though? Is this something that should be defined for a whole site/project?

Member

jonbullock commented May 13, 2015

I like this idea... not sure if limiting this to just a single folder is the right way to go though? Is this something that should be defined for a whole site/project?

@puredanger

This comment has been minimized.

Show comment
Hide comment
@puredanger

puredanger Nov 3, 2015

I have the same desired goal as this (urls with no extension), but would actually prefer to just create a file with no extension at all. This works fine on s3 (for example) if you set the content-type property for the file.

puredanger commented Nov 3, 2015

I have the same desired goal as this (urls with no extension), but would actually prefer to just create a file with no extension at all. This works fine on s3 (for example) if you set the content-type property for the file.

@jonbullock

This comment has been minimized.

Show comment
Hide comment
@jonbullock

jonbullock Nov 3, 2015

Member

Hi Alex, try defining output.extension in your jbake.properties without a value to override the default value of .html which should achieve what you want. I could be wrong as I've not had time to try this myself.

Member

jonbullock commented Nov 3, 2015

Hi Alex, try defining output.extension in your jbake.properties without a value to override the default value of .html which should achieve what you want. I could be wrong as I've not had time to try this myself.

@puredanger

This comment has been minimized.

Show comment
Hide comment
@puredanger

puredanger Nov 3, 2015

I have tried that - it doesn't work.

puredanger commented Nov 3, 2015

I have tried that - it doesn't work.

@jonbullock

This comment has been minimized.

Show comment
Hide comment
@jonbullock

jonbullock Nov 4, 2015

Member

Ahh I see what the problem is, I've just committed a fix to master branch, it'll be included in v2.5.0 release. The built in pages will still get an extension but they can be overridden by using additional options.

Member

jonbullock commented Nov 4, 2015

Ahh I see what the problem is, I've just committed a fix to master branch, it'll be included in v2.5.0 release. The built in pages will still get an extension but they can be overridden by using additional options.

@puredanger

This comment has been minimized.

Show comment
Hide comment
@puredanger

puredanger Nov 4, 2015

Is there an expected timeframe for the 2.5.0 release?

puredanger commented Nov 4, 2015

Is there an expected timeframe for the 2.5.0 release?

@jonbullock

This comment has been minimized.

Show comment
Hide comment
@jonbullock

jonbullock Nov 4, 2015

Member

I'm working on it at the moment and I'm hoping to have it out by year end at the latest. This is the last pull request I need to deal with then it's clean up work, as the master branch has moved on significantly since some of the pull requests were created.

Member

jonbullock commented Nov 4, 2015

I'm working on it at the moment and I'm hoping to have it out by year end at the latest. This is the last pull request I need to deal with then it's clean up work, as the master branch has moved on significantly since some of the pull requests were created.

@jonbullock jonbullock merged commit 98ce1d3 into jbake-org:master Nov 18, 2015

1 check passed

default The Travis CI build passed
Details

jonbullock added a commit that referenced this pull request Nov 18, 2015

jonbullock added a commit that referenced this pull request Nov 18, 2015

@jonbullock jonbullock self-assigned this Jun 10, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment