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
allow the use id's in the permalink url. #405
Conversation
It's not a really good idea to expose ID. This field is for internal use only. But perhaps we can:
But perhaps other are ok to merge this. |
The code that creates the permalink slug from the title should ensure uniqueness. The problem is of course that this uniqueness is only actually needed if two articles containing the same title fall on the same day. I don't think that's a problem: I'm fine with the following urls:
On the same day, we would get:
|
that sounds like a better idea. I can write something up and resubmit. |
Hello, Everybody does not use date based permalinks (I don't). @yaf and I have been discussing that point this morning, and we think that the permalink itself should be unique. In case of a duplicate permalink, we have 2 solutions:
I'd go with 2 anyway, and since cool URIs don't change only start using that on new posts (which means that it should only be applied to post being published for the first time OR that were withdrawn) which add some complexity |
Yes, option 2) is basically what I was trying to describe. The friendly_id gem provides this method of permalink creation (called 'slug' in friendly_id terms). |
In an ideal world, the permalink generator would use a stop words file in the language the blog is configured to remove all stop words from the perma. In this world, when I need to optimize a slug (Wordpress word BTW), I do it myself :) |
Would appending a hash to the second article be acceptable |
How about the date in YYYYMMDD format instead of the hash idea? That would look a little neater than a hash and add a little more semantic info.
|
nah, just 2, 3.... Keep it straight simple please. |
sorry about the absence, got busy with other stuff. I'm going to close this and reopen in a bit from a feature branch so that the pull request is not so noisy. |
I am using publify as a log and I have users that like to use the current date as the title. Sometimes this results in multiple articles with the same title on the same day. The default permalink url will return the first article. By allowing the use of the id in the permalink specification it becomes possible to distinguish between the articles. This might be too specific a use case to merge but I wanted to raise the issue.