Slugify - Parent

SEO-friendly URLs with Slugify

License

License

GroupId

GroupId

com.github.slugify
ArtifactId

ArtifactId

slugify-parent
Last Version

Last Version

2.5
Release Date

Release Date

Type

Type

pom
Description

Description

Slugify - Parent
SEO-friendly URLs with Slugify
Project URL

Project URL

https://github.com/slugify
Source Code Management

Source Code Management

https://github.com/slugify/slugify

Download slugify-parent

Filename Size
slugify-parent-2.5.pom 2 KB
Browse

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.slugify/slugify-parent/ -->
<dependency>
    <groupId>com.github.slugify</groupId>
    <artifactId>slugify-parent</artifactId>
    <version>2.5</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/com.github.slugify/slugify-parent/
implementation 'com.github.slugify:slugify-parent:2.5'
// https://jarcasting.com/artifacts/com.github.slugify/slugify-parent/
implementation ("com.github.slugify:slugify-parent:2.5")
'com.github.slugify:slugify-parent:pom:2.5'
<dependency org="com.github.slugify" name="slugify-parent" rev="2.5">
  <artifact name="slugify-parent" type="pom" />
</dependency>
@Grapes(
@Grab(group='com.github.slugify', module='slugify-parent', version='2.5')
)
libraryDependencies += "com.github.slugify" % "slugify-parent" % "2.5"
[com.github.slugify/slugify-parent "2.5"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

  • core
  • jstl

Slugify Build Status

SEO-friendly URLs with Slugify

Notice

If you want to use it directly in your JSP, take a look into jstl

Usage

If you want to use Slugify in your Java code you only need the library itself. Here's the dependency information for Maven:

<dependency>
	<groupId>com.github.slugify</groupId>
	<artifactId>slugify</artifactId>
	<version>2.4</version>
</dependency>

Now you're able to use it:

Slugify slg = new Slugify();
String result = slg.slugify("Hello, world!");
// result: hello-world

You can set custom replacements for Slugify:

Slugify slg = slg.withCustomReplacement("hello", "world").withCustomReplacement("foo", "bar");
// or multiple at once
slg = slg.withCustomReplacements(new HashMap<String, String>() {{
	put("hello", "world");
	put("foo", "bar");
}});

String result = slg.slugify("hello foo");
// result: world-bar

Or if you want case sensitivity:

Slugify slg = new Slugify().withLowerCase(false);
String result = slg.slugify("Hello, World!");
// result: Hello-World

Versions

Version
2.5
2.4
2.3
2.2
2.1.12
2.1.11
2.1.10
2.1.9
2.1.8
2.1.7
2.1.6
2.1.5
2.1.4
2.1.3
2.1.2
2.1.1
2.1.0
2.0.2
2.0.1-RELEASE
2.0.0