jekyll / jekyll

:globe_with_meridians: Jekyll is a blog-aware static site generator in Ruby
https://jekyllrb.com
MIT License
49.19k stars 9.98k forks source link

Support a default permalink w/o categories #3687

Closed cfjedimaster closed 8 years ago

cfjedimaster commented 9 years ago

I was surprised to find that Jekyll uses a default permalink that includes site categories in the url and that all the default ones also include it. It seems that most blogs go with

/:year/:month/:day/:title.html

And while it is trivial to set that in _config.yml, I'd expect with the popularity of that form (at least in my experience) that it should be one of the built in styles.

envygeeks commented 9 years ago

I like this! :+1: but the problem here is that this change would either have to go into Jekyll 3 (current master) or wait until Jekyll 4 (probably the best) IMO because changing the URL drastically like that is gonna effect a lot of people. What do you think @parkr?

parkr commented 9 years ago

I agree with you that we should wait until Jekyll 4 for this.

cfjedimaster commented 9 years ago

I don't mind waiting, but isn't this just a new shorthand alias? How is this a change to an existing url? (Unless I read yall wrong.)

On Tue, May 12, 2015 at 1:22 PM, Parker Moore notifications@github.com wrote:

I agree with you that we should wait until Jekyll 4 for this.

— Reply to this email directly or view it on GitHub https://github.com/jekyll/jekyll/issues/3687#issuecomment-101374259.

Raymond Camden, Developer Advocate for MobileFirst at IBM

Email : raymondcamden@gmail.com Blog : www.raymondcamden.com Twitter: raymondcamden

envygeeks commented 9 years ago

You asked for it to be the default, changing the permalink default would rewrite entire site's and break everything they've spent time doing for no benefit, if you would just like a new short-alias then that's fine but as for a default it'll have to wait.

cfjedimaster commented 9 years ago

No, not the default - and if I said that - I'm really sorry. I meant "a default", as in a short alias. Now, imo, it should be the default, but I'm a Jekyll noob and that's just my opinion.

On Tue, May 12, 2015 at 4:33 PM, Jordon Bedwell notifications@github.com wrote:

You asked for it to be the default, changing the permalink default would rewrite entire site's and break everything they've spent time doing for no benefit, if you would just like a new short-alias then that's fine but as for a default it'll have to wait.

— Reply to this email directly or view it on GitHub https://github.com/jekyll/jekyll/issues/3687#issuecomment-101428141.

Raymond Camden, Developer Advocate for MobileFirst at IBM

Email : raymondcamden@gmail.com Blog : www.raymondcamden.com Twitter: raymondcamden

envygeeks commented 9 years ago

Well, I'm sure we'd be happy to add an alias for Jekyll3 (the current master) that's no problem (that is unless it already exists, I don't remember since we don't permalink that way -- but I know most do so yeah...) and your opinion on it being the default stands and is welcome but that'll have to wait until Jekyll3. But sure we can add an alias on the upcoming release no problem probably unless somebody on @jekyll/core has a problem.

cfjedimaster commented 9 years ago

Coolio. I'm giving a preso tomorrow on Static Site Generators and Jekyll is the one I'm recommending the most. I find it a bit complex at times, but I love how extensible it is.

Um - that's kinda OT - but - there ya go.

On Tue, May 12, 2015 at 5:51 PM, Jordon Bedwell notifications@github.com wrote:

Well, I'm sure we'd be happy to add an alias for Jekyll3 (the current master) that's no problem (that is unless it already exists, I don't remember since we don't permalink that way -- but I know most do so yeah...) and your opinion on it being the default stands and is welcome but that'll have to wait until Jekyll3. But sure we can add an alias on the upcoming release no problem probably unless somebody on @jekyll/core https://github.com/orgs/jekyll/teams/core has a problem.

— Reply to this email directly or view it on GitHub https://github.com/jekyll/jekyll/issues/3687#issuecomment-101450124.

Raymond Camden, Developer Advocate for MobileFirst at IBM

Email : raymondcamden@gmail.com Blog : www.raymondcamden.com Twitter: raymondcamden

willnorris commented 9 years ago

Just make sure to update Utils::add_permalink_suffix in addition to adding it to Post::template. (I probably should have left a comment in Post::template reminding people of that)

sunnyrjuneja commented 8 years ago

I believe this issue can be closed. Take a look at: https://github.com/jekyll/jekyll/blob/master/lib/jekyll/configuration.rb#L50 which reads:

    DEFAULTS = Configuration[{
      ...
      'permalink'     => 'date',

I believe this is the commit that closed this issue: https://github.com/jekyll/jekyll/commit/229cedfc500f60021b61b6f16d86d9c2a06cb933

cfjedimaster commented 8 years ago

Actually - are you sure? According to the docs, date is already a supported built in style and it uses:

/:categories/:year/:month/:day/:title.html

which is not what I was requesting.