Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Special slug/url for posts #67

Open
heykaley opened this issue Oct 1, 2017 · 1 comment
Open

Special slug/url for posts #67

heykaley opened this issue Oct 1, 2017 · 1 comment
Labels

Comments

@heykaley
Copy link

heykaley commented Oct 1, 2017

Hi,

I love the work you put in so far. There's one thing that I am still missing though. Currently all posts and pages can get a slug e.g. domain.tld/post-name or domain.tld/page-name. It would be great if all posts would go under domain.tld/post/post-name and pages would stay with domain.tld/page-name. It would be even greater if I had the possibility to adjust the parameter for posts (so instead of domain.tld/post/post-name I could go for domain.tld/magazine/post-name). Allowing "/" in slugs would be a simple solution for now (maybe with automatically adding /post/ before /post-name/).

I hope you get the idea. Sorry, it's late and I'm German haha.

Best regards,
Kaléy.

@claviska
Copy link
Member

claviska commented Oct 2, 2017

I like this idea, and I don't think it would be too difficult to implement. Separating posts from pages is the logical thing to do and for some reason it flew under my radar until you mentioned it.

There's already a slug setting for the blog in .env so we can just tap into that.

Off the top of my head, here's what needs to be done:

  • Update router/controller to only accept /blog/{slug} for posts (prevent duplicate content)
  • Update router/controller to only accept /{slug} for pages

There might be more after diving in, but should be pretty straight forward. I'd gladly accept a PR if you're up for the task and want a faster turn around.

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

No branches or pull requests

2 participants