| Crates.io | slugi |
| lib.rs | slugi |
| version | 0.1.1 |
| created_at | 2025-10-04 15:21:11.197695+00 |
| updated_at | 2025-10-04 15:35:22.972454+00 |
| description | A simple Rust library to slugify text (e.g., 'Café au lait' → 'cafe_au_lait'). |
| homepage | |
| repository | https://github.com/yourusername/slugify |
| max_upload_size | |
| id | 1867991 |
| size | 4,370 |
A simple, lightweight Rust library for turning text into URL-safe slugs.
Inspired by tools like Python’s slugify, but designed for idiomatic Rust usage.
GITHUBLINK
https://github.com/Omchaudhary2004/slugify
Café → cafe)_Add slugi to your Cargo.toml:
[dependencies]
slugi = "0.1"
Or install directly with Cargo:
cargo add slugi
🚀 Usage
use slugi::slugify;
fn main() {
let text = "Café au lait! 2025";
let slug = slugify(text);
println!("Original: {}", text);
println!("Slugified: {}", slug);
// Output: cafe_au_lait_2025
}
📖 Documentation
Full API docs are available at docs.rs/slugi .
✅ Roadmap
Support for more diacritics
Configurable replacement character (- instead of _)
Optional Unicode normalization
🤝 Contributing
Contributions, issues, and feature requests are welcome! Feel free to check the issues page .
Fork the repo
Create a new branch (git checkout -b feature/my-feature)
Commit changes (git commit -m 'Add my feature')
Push to the branch (git push origin feature/my-feature)
Open a Pull Request