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

Slug: URL-safe slug generator #19012

Merged
merged 5 commits into from Jul 7, 2021
Merged

Slug: URL-safe slug generator #19012

merged 5 commits into from Jul 7, 2021

Conversation

aantron
Copy link
Contributor

@aantron aantron commented Jul 7, 2021

In summary,

Slug.slugify "Some page title"

returns

"some-page-title"

which is more suitable for use in URLs. Slug offers several options for tweaking the exact behavior.


From the README:

A URL slug is the part of a URL or link that comes after the domain extension.

In websites the keyword used for your URL slug can be used to SEO optimize the URL by showing Google the structure of your site and the contents of the page in question.

This library turns title into URL-safe slug with support for non-latin characters.

This library uses algorithm and data from node-slugify

@aantron
Copy link
Contributor Author

aantron commented Jul 7, 2021

cc @thangngoc89

Copy link
Member

@mseri mseri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few things to update. Can you make the changes upstream?
EDIT: Let's wait for the CI and see if we need more lower bounds

packages/slug/slug.1.0.0/opam Outdated Show resolved Hide resolved
packages/slug/slug.1.0.0/opam Show resolved Hide resolved
packages/slug/slug.1.0.0/opam Outdated Show resolved Hide resolved
packages/slug/slug.1.0.0/opam Outdated Show resolved Hide resolved
Co-authored-by: Anil Madhavapeddy <anil@recoil.org>
packages/slug/slug.1.0.0/opam Outdated Show resolved Hide resolved
packages/slug/slug.1.0.0/opam Outdated Show resolved Hide resolved
thangngoc89 added a commit to thangngoc89/ocaml-slug that referenced this pull request Jul 7, 2021
@thangngoc89
Copy link
Contributor

I updated upstream with all the suggested changes

@mseri
Copy link
Member

mseri commented Jul 7, 2021

Can you please add a license field with the correct license in spdx format?
After that, this can be merged

@thangngoc89
Copy link
Contributor

@mseri I added it upstream here but I don't have write access to this PR
thangngoc89/ocaml-slug@e4d8f79

@mseri
Copy link
Member

mseri commented Jul 7, 2021

Good to merge now!

@mseri mseri merged commit ab168cb into ocaml:master Jul 7, 2021
@mseri
Copy link
Member

mseri commented Jul 7, 2021

Consider announcing the release on discuss.ocaml.org :)

@thangngoc89
Copy link
Contributor

Thank you very much.

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

Successfully merging this pull request may close these issues.

None yet

4 participants