Can Hexo remove "/" at the end of the url? #5320
-
I just learned Hexo a few days ago, maybe this is a little unimportant but I really want to know the answer. Before : localhost:4000/categories/ After: localhost:4000/categories I've used permalinks, but I can't get rid of the '/' symbox in each category/tags list Is there a way to remove the '/" symbol at the end of each URL? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Generally speaking, paths with a slash after them are considered folders, and paths without a slash are considered files. https://hexo.io/docs/configuration#URL if you want remove slash, try to set # _config.yml
- permalink: :year/:month/:day/:title/
+ permalink: :year/:month/:day/:title.html
pretty_urls:
- trailing_html: true # Set to false to remove trailing '.html' from permalinks
+ trailing_html: false # Set to false to remove trailing '.html' from permalinks
|
Beta Was this translation helpful? Give feedback.
Generally speaking, paths with a slash after them are considered folders, and paths without a slash are considered files.
https://hexo.io/docs/configuration#URL
if you want remove slash, try to set
permalink
ends with.html
and turn offtrailing_html