I have read in the documentation about the permalinks.
In my website, I have used permalink: none
. But it still doesn’t remove .html extension, it only removes the date.
I have read in the documentation about the permalinks.
In my website, I have used permalink: none
. But it still doesn’t remove .html extension, it only removes the date.
this needs server configuration, see the docs:
I have read the documentation.
When I use permalink: none
then it only disappear the date from the link.
When I use permalink: pretty
then it only disappear the extension.
But I want both. So how to do it?
you don’t have to use the premade ones like none or pretty, you can make your own, I think maybe you want it to be:
permalink: /:categories/:title
You then need to make sure your webserver is set to not show the extension. I do not have direct experience with extensionless urls, it seems more durable to me to just have a trailing slash at the end.
In another thread you asked about hosting on AWS, if you meant S3 then I think extensionless urls are not easy to do - I use S3 a lot, and when I looked at doing extensionless urls it lookes like you had to actually remove the extension from each file, is that just seems like a bad idea - jekyll is not going to do that.
I have tried to use the .htaccess file. (Not on S3, but on simple server) Reading from this blog
But it messes all my Jekyll website, when I have uploaded that file in my root directory it doesn’t open any blog post but when I added /index with every link then opens up.
an .htaccess file is something that is used by apache (?) on your web server. It will not work with AWS S3.
AWS S3 isn’t really a web server in that sense. It is a great way to host a website, but if you want to do complex server config it likely will not work for you.
When you ask questions, please add more detail, like above, I am assuming you added the htaccess file to S3, but maybe not - you gave no detail as to how you are hosting. I realize it is work for you to add detail, but it is work for us to answer and you will increase your chance of success with more detail / googling first.
@yashumittal have you checked out https://learn.cloudcannon.com/jekyll/permalinks/
Read this article to know more: https://medium.com/@mittalyashu/how-to-remove-html-extension-in-jekyll-efeb48bd725f