Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add middleware to force trailing slash or to remove trailing slash #148

Closed
prabirshrestha opened this issue Sep 10, 2022 · 3 comments
Closed

Comments

@prabirshrestha
Copy link
Contributor

Similar to https://echo.labstack.com/middleware/trailing-slash/.

Some blog sites forces trailing slash and some doesn't. In order to maintain SEO as I move moved from an old blog framework I would like to force trailing slash or remove it.

Forcing trailing slash also makes markdown just work for blogs. For those navigating to http://localhost:8080/posts/welcome/ with the welcome/article.md one could write ![image](image.png) which is in welcome/image.png folder and it would correctly render the image http://localhost:8080/posts/welcome/image.png.

@chrislearn
Copy link
Member

Done

@prabirshrestha
Copy link
Contributor Author

This works. Though I think it should be named trailing_slash instead of tailing_slash.

@prabirshrestha
Copy link
Contributor Author

Thanks for renaming it to trailing_slash.

This is now working as expected.

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

No branches or pull requests

2 participants