: How to remove categories from Jekyll Kasper theme blog post URLs I started using the beautiful Kasper theme for Jekyll. However my blog post URL contains the categories. I don't want it
I started using the beautiful Kasper theme for Jekyll. However my blog post URL contains the categories. I don't want it to have them there:.
myhost.com:4000/dev,datascience/2013/11/10/mypost.html
How do I remove the dev,datascience categories from that URL?
I'm worried about it because if I change the categories of the blog bost, it would change the URL. I don't want that to happen.
More posts by @Gonzalez347
1 Comments
Sorted by latest first Latest Oldest Best
Two easy ways to fix this, depending on whether you want to customise just one blog post or make the change site-wide.
For just one post, manually set its URL in the YAML front matter like so:
---
permalink: /2013/11/10/mypost.html
---
To change every post site-wide, you would edit your _config.yml to switch from the default 'date' permalink pattern you currently use, to something like this:
permalink: /:year/:month/:day/:title.html
Remember that if this is a published site, your old links may have been indexed already by search engines (or bookmarked by visitors) so best practice is to set up redirects from the old URLs to the new ones. How has been asked & answered here many times, try '301 redirect' + the name of your server for examples.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.