Giter VIP home page Giter VIP logo

Comments (8)

Xendiadyon avatar Xendiadyon commented on May 23, 2024 5

A setting with characters to preserve would be great!

from slugify.

sindresorhus avatar sindresorhus commented on May 23, 2024 1

There are lots of characters that are allowed in a URL that are replaced by a dash. That's how slugification usually works.

We could potentially add an option with an array of characters to preserve, but as a user, I think version3-1 is perfectly fine.

from slugify.

GrosSacASac avatar GrosSacASac commented on May 23, 2024

As I understands, slugify should work nice with filenames, and having a dot in the filename can change how it is opened by default

from slugify.

iffjey avatar iffjey commented on May 23, 2024

I also encountered this issue during migration of a blog. In a previous system we used «underscore» as valid part of slug. And now in Gatsby it's impossible to save previous structure/paths. Would be really awesome to see this improvement.

from slugify.

iffjey avatar iffjey commented on May 23, 2024

@sindresorhus If you okay with a proposal to add an option to preserve some characters, I can make a PR

p.s. oh crap, just noticed that you're on a vacation, sry :)

from slugify.

sindresorhus avatar sindresorhus commented on May 23, 2024

PR welcome. You can use 2aa5659 as an example of what's expected of the PR.

from slugify.

iffjey avatar iffjey commented on May 23, 2024

Also I noticed, that Gatsby uses v.1.x.x of slugify, so this change probably won't benefit me 😅. But I will try anyway. Thank you

from slugify.

sailuna avatar sailuna commented on May 23, 2024

Hello @sindresorhus . Is it still perhaps possible to create a function that preserves a dot "." in the url? :/

from slugify.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.