Skip to content

Commit

Permalink
Add more info to readme (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
matrixik committed Nov 8, 2021
1 parent a6b6b19 commit 832cfdf
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions README.md
@@ -1,6 +1,6 @@
# slug

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

[![Go Reference](https://pkg.go.dev/badge/github.com/gosimple/slug.svg)](https://pkg.go.dev/github.com/gosimple/slug)
Expand Down Expand Up @@ -43,10 +43,34 @@ func main() {
}
```

### Requests or bugs?
## Design

This library will always returns clean output from any Unicode string
containing only the following ASCII characters:

* numbers: `0-9`
* small letters: `a-z`
* big letters: `A-Z` (only if you set `Lowercase` to `false`)
* minus sign: `-`
* underscore: `_`

Minus sign and underscore characters will never appear at the beginning or
the end of the returned string.

Thanks to context-insensitive transliteration of Unicode characters to ASCII
output returned string is safe for URL slugs and filenames.

## Requests or bugs?

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

If your language is missing you could add it in `languages_substitution.go`
file.

In case of missing proper Unicode characters transliteration to ASCII you could
add them to underlying library:
<https://github.com/gosimple/unidecode>.

## Installation

```shell
Expand Down

0 comments on commit 832cfdf

Please sign in to comment.