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

Option for limiting the length of the generated slug #18

Open
FarshanAhamed opened this issue Nov 9, 2020 · 3 comments
Open

Option for limiting the length of the generated slug #18

FarshanAhamed opened this issue Nov 9, 2020 · 3 comments

Comments

@FarshanAhamed
Copy link

To make the URL SEO friendly, accepting a length parameter in Config or GenerateSlug() for truncating the string to a limit would be a good addition.

@ctolkien
Copy link
Owner

Any suggestions for a good default here?

@FarshanAhamed
Copy link
Author

@ctolkien Better to keep it unlimited by default, I guess.

@Zetanova
Copy link

Zetanova commented Apr 5, 2024

A oversized slug can be first be murmur hashed, then trimmed to max-length minus 3 characters and appended with the hex number of the first hex-byte of the hash "-xx"

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

No branches or pull requests

3 participants