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

Open
nelsonic opened this issue Jan 10, 2025 · 0 comments
Open

Slug #23

nelsonic opened this issue Jan 10, 2025 · 0 comments
Labels
discuss Share your constructive thoughts on how to make progress with this issue documentation Improvements or additions to documentation elixir Pull requests that update Elixir code enhancement New feature or enhancement of existing functionality help wanted If you can help make progress with this issue, please comment! priority-2 Second highest priority, should be worked on as soon as the Priority-1 issues are finished research Research required; be specific T2h Time Estimate 2 Hours technical A technical issue that requires understanding of the code, infrastructure or dependencies

Comments

@nelsonic
Copy link
Member

When crafting Search Engine friendly URLs e.g. for a website or blog
we need to include as many useful keywords as practical in the URL up to a length limit; e.g: 64 char

If the blog post / page title is "How To Do What You Love And Get Paid?" (37 char)
The slug could be: "how-to-do-what-you-love-and-get-paid"

This is just:

"How To Do What You Love And Get Paid?"
|> String.replace("?", "") # remove question marks from URLs
|> String.downcase()        # Use only lowercase letters
|> String.replace(" ", "-") 

> "how-to-do-what-you-love-and-get-paid"

But there appears to be more to this: (fairly predictably)
https://stackoverflow.com/questions/39394916/how-to-truncate-a-string-in-elixir

So we need to collect all the requirements, and ideally match what Wordpress are doing.
Then write our own function and publish it!

If you're interested in working on this function, please drop a comment. 💬

@nelsonic nelsonic added documentation Improvements or additions to documentation enhancement New feature or enhancement of existing functionality help wanted If you can help make progress with this issue, please comment! discuss Share your constructive thoughts on how to make progress with this issue T2h Time Estimate 2 Hours technical A technical issue that requires understanding of the code, infrastructure or dependencies elixir Pull requests that update Elixir code research Research required; be specific priority-2 Second highest priority, should be worked on as soon as the Priority-1 issues are finished labels Jan 10, 2025
@github-project-automation github-project-automation bot moved this to More ToDo ThanCanEver Be Done in Nelson's List Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Share your constructive thoughts on how to make progress with this issue documentation Improvements or additions to documentation elixir Pull requests that update Elixir code enhancement New feature or enhancement of existing functionality help wanted If you can help make progress with this issue, please comment! priority-2 Second highest priority, should be worked on as soon as the Priority-1 issues are finished research Research required; be specific T2h Time Estimate 2 Hours technical A technical issue that requires understanding of the code, infrastructure or dependencies
Projects
Status: More ToDo ThanCanEver Be Done
Status: No status
Development

No branches or pull requests

1 participant