You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.4 KiB

% Generated by roxygen2: do not edit by hand
2 years ago
% Please edit documentation in R/slugify-package.R, R/slugify.R
2 years ago
\title{Create Slug Strings for SEO}
2 years ago
slugify(x, replacement = "-", remove = NULL, lower = TRUE, strict = TRUE)
\item{replacement}{replace spaces with replacement character, defaults to \code{-}}
2 years ago
\item{remove}{remove characters that match this JavaScript regex, defaults to \code{NULL} (no deleting).
This should be a \href{}{JavaScript bare regex}
including the \verb{//} and any modifiers. e.g. to remove all R's (upper and lower) from a slug you should
specify \verb{remove = "/[rR]/g}.}
2 years ago
\item{lower}{convert to lower case, defaults to \code{TRUE}}
\item{strict}{strip special characters except replacement, defaults to \code{TRUE}}
2 years ago
Most blogging platforms turn title phrases into slugs
for better SEO. Tools are provided to turn phrases into slugs.
2 years ago
slugify("R is great!") # "r-is-great"
slugify("R is great!", replacement = "@") # "r@is@great"
slugify("R is great!", remove = "/[Rr]/g") # "is-geat"
Useful links:
\item \url{}
\item Report bugs at \url{}
Bob Rudis (