All Projects → gosimple → Slug

gosimple / Slug

Licence: mpl-2.0
URL-friendly slugify with multiple languages support.

Programming Languages

go
31211 projects - #10 most used programming language

Labels

Projects that are alternatives of or similar to Slug

Slugify Cli
Slugify a string
Stars: ✭ 49 (-92.25%)
Mutual labels:  slug
Translug
中文的 url slug 支持
Stars: ✭ 145 (-77.06%)
Mutual labels:  slug
github-env-vars-action
🚀 GitHub Action for Environment Variables
Stars: ✭ 129 (-79.59%)
Mutual labels:  slug
Slugifier
Just a simple, clean and pure functional implementation for creating slugs
Stars: ✭ 69 (-89.08%)
Mutual labels:  slug
Nova Slug Field
Slug field for Laravel Nova
Stars: ✭ 131 (-79.27%)
Mutual labels:  slug
Slugify
Slugify a string
Stars: ✭ 2,110 (+233.86%)
Mutual labels:  slug
Slug Generator
Slug Generator Library for PHP, based on Unicode’s CLDR data
Stars: ✭ 740 (+17.09%)
Mutual labels:  slug
Eloquent Sluggable
Easy creation of slugs for your Eloquent models in Laravel
Stars: ✭ 3,321 (+425.47%)
Mutual labels:  slug
Laravel Hashslug
Package providing a trait to use Hashids on a model
Stars: ✭ 136 (-78.48%)
Mutual labels:  slug
mongoose-slug-plugin
Slugs for Mongoose with history and i18n support (uses speakingurl by default, but you can use any slug library such as limax, slugify, mollusc, or slugme)
Stars: ✭ 21 (-96.68%)
Mutual labels:  slug
Sluggish
Toy CPU and GPU implementations of the Slug rendering algorithm
Stars: ✭ 70 (-88.92%)
Mutual labels:  slug
Github Slug Action
GitHub Action to expose slug value of GitHub environment variables inside your GitHub workflow
Stars: ✭ 96 (-84.81%)
Mutual labels:  slug
SlugGenerator
Slug generator for .net
Stars: ✭ 26 (-95.89%)
Mutual labels:  slug
Speakingurl
Generate a slug – transliteration with a lot of options
Stars: ✭ 1,056 (+67.09%)
Mutual labels:  slug
awesome
🎉 An Open Microservice for "awesome" slugs.
Stars: ✭ 25 (-96.04%)
Mutual labels:  slug
Slug
Slugging for CakePHP
Stars: ✭ 32 (-94.94%)
Mutual labels:  slug
Slugger
A Slugger for elixir.
Stars: ✭ 149 (-76.42%)
Mutual labels:  slug
Limax
Node.js module to generate URL slugs. Another one? This one cares about i18n and transliterates non-Latin scripts to conform to the RFC3986 standard. Mostly API-compatible with similar modules.
Stars: ✭ 423 (-33.07%)
Mutual labels:  slug
slugify
A Go slugify application that handles string
Stars: ✭ 31 (-95.09%)
Mutual labels:  slug
mongoose-slug-updater
Schema-based slug plugin for Mongoose - single/compound - unique over collection/group - nested docs/arrays - relative/abs paths - sync on change: create/save/update/updateOne/updateMany/findOneAndUpdate tracked - $set operator - counter/shortId
Stars: ✭ 37 (-94.15%)
Mutual labels:  slug

slug

Package slug generate slug from unicode string, URL-friendly slugify with multiple languages support.

GoDoc Build Status

Documentation online

Example

package main

import (
	"fmt"
	"github.com/gosimple/slug"
)

func main() {
	text := slug.Make("Hellö Wörld хелло ворлд")
	fmt.Println(text) // Will print: "hello-world-khello-vorld"

	someText := slug.Make("影師")
	fmt.Println(someText) // Will print: "ying-shi"

	enText := slug.MakeLang("This & that", "en")
	fmt.Println(enText) // Will print: "this-and-that"

	deText := slug.MakeLang("Diese & Dass", "de")
	fmt.Println(deText) // Will print: "diese-und-dass"
	
	slug.Lowercase = false // Keep uppercase characters
	deUppercaseText := slug.MakeLang("Diese & Dass", "de")
        fmt.Println(deUppercaseText) // Will print: "Diese-und-Dass"

	slug.CustomSub = map[string]string{
		"water": "sand",
	}
	textSub := slug.Make("water is hot")
	fmt.Println(textSub) // Will print: "sand-is-hot"
}

Requests or bugs?

https://github.com/gosimple/slug/issues

Installation

go get -u github.com/gosimple/slug

License

The source files are distributed under the Mozilla Public License, version 2.0, unless otherwise noted. Please read the FAQ if you have further questions regarding the license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].