Skip to content

Can Hexo remove "/" at the end of the url? #5320

Discussion options

You must be logged in to vote

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 off trailing_html

# _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

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by yoshinorin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants