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

Change the detail-post Url to human readable url #27

Open
MathiasTim opened this issue Jul 25, 2013 · 4 comments
Open

Change the detail-post Url to human readable url #27

MathiasTim opened this issue Jul 25, 2013 · 4 comments

Comments

@MathiasTim
Copy link
Member

Maybe we should change the url to a more human readable url.
Because https://getfedu.com/#detail-view-post/51f01b826e204cd832000005 looks like sh*t.

But the question is, how should we do it, just with a slug, or a slug added after the id to keep up the speed?!

@MartinKolb1987
Copy link
Member

I think with a slug would be the best solution. A mix between id or a timestamp and the title of the video ist good.
E.g. 20131124-paul-irish-yeoman . So it looks better then 51f01b826e204cd832000005-paul-irish-yeoman

So we could implement it:
1.) save the slug into the post collection entry
2.) generate another "urls/slugs/whatever" collection and save this there an match the request on it

what do you guys think?

@monbro
Copy link
Member

monbro commented Jul 26, 2013

I vote for @MartinKolb1987 solution and to store it in the same document like the video. To keep it simple you could just check if the url exists already before creating and using it. Otherwise just append a increment like 20131124-paul-irish-yeoman-2. That should be simple and prevent any conflict.

@MathiasTim
Copy link
Member Author

But you know looking up an id should be much faster, than a string, or am i wrong?

@monbro
Copy link
Member

monbro commented Jul 26, 2013

A nice index on the slug field will do the trick in here.

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

No branches or pull requests

3 participants