chayandatta / Slugify.jl

Slugify.jl is a package for the Julia programming language that provides functionality for creating slugs from text

Home Page:https://juliahub.com/ui/Packages/General/Slugify

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Slugify.jl

Slugify.jl is a package for the Julia programming language that provides functionality for creating slugs from text. Slugs are typically used in web development to create human-readable URLs for pages, blog posts, and other content. Slugify.jl takes a string of text and converts it into a URL-friendly format, typically by replacing spaces and special characters with hyphens or underscores. This can be useful for improving the search engine optimization (SEO) of a website and making it easier for users to share links.

Installation:

one-liner

Pkg.add("Slugify")

more info

julia> using Pkg

julia> Pkg.add("Slugify")
    Updating registry at `~/.julia/registries/General.toml`
   Resolving package versions...
   Installed Slugify ─ v1.0.0
    Updating `~/.julia/environments/v1.8/Project.toml`
  [6a57dadc] ~ Slugify v1.0.0 `~/Documents/slugify.jl`  v1.0.0
    Updating `~/.julia/environments/v1.8/Manifest.toml`
  [6a57dadc] ~ Slugify v1.0.0 `~/Documents/slugify.jl`  v1.0.0
Precompiling project...
  1 dependency successfully precompiled in 1 seconds. 139 already precompiled.

julia>

How to use Slugify

julia> using Slugify

julia> slugify("foo bar")
"foo-bar"

# if you prefer something other than '-' as separator
julia> slugify("foo buzz", "_")
"foo_buzz"

# unicode support
julia> slugify("we ♥ Julia")
"we-love-Julia"

julia>

About

Slugify.jl is a package for the Julia programming language that provides functionality for creating slugs from text

https://juliahub.com/ui/Packages/General/Slugify

License:MIT License


Languages

Language:Julia 100.0%