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

Post slug handling issues #103

Open
rygel opened this issue Sep 25, 2014 · 1 comment
Open

Post slug handling issues #103

rygel opened this issue Sep 25, 2014 · 1 comment

Comments

@rygel
Copy link

rygel commented Sep 25, 2014

Hi,

I have found some issues with the slug handling.

Short explanation how I am using Poet:
I am working on a small company website where I not only use Poet for the news section (= a blog), but also to power a set of products, a set of services and a set of career opportunities. So I have 4 separate instances in my application and it works great so far. However, because I am also using it to manage a set of products and services, I am very concerned about the URLs and need them to be in a specific way. Before the recent changes I could get away with defining the filenames of the markdown files. But now I have to define the slug myself inside of the markdown file. I like the new handling better, because now the filenames are not so important anymore. However, I found some issues with the slug handling.

  1. When defining a slug it will still be filtered and lowercased. I am not sure if this is intended? Because I was under the impression when I am defining the slug myself, I can decide how it looks like. And not being forced to all lowercase slugs.
  2. And more important for me. The filtering is not correct, because parentheses are removed from the slug, but they are allowed in URLs.

I fixed the second issue by changing the regex inside convertStringToSlug to include the parentheses:
.replace(/[^\w- ()]+/g,'')

Alex

@adam-beck
Copy link

This was also mentioned at the end of #100

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