Skip to contents

Lowercases, replaces any run of non-alphanumeric characters with a single hyphen, and trims leading and trailing hyphens.

Usage

slugify(x)

Arguments

x

Character vector of headings.

Value

A character vector of slugs, the same length as x.

Examples

slugify("Project Organisation")
#> [1] "project-organisation"
slugify("Writing a reprex / getting unstuck")
#> [1] "writing-a-reprex-getting-unstuck"
slugify('"Good Enough" principles')
#> [1] "good-enough-principles"