slug

package
v0.0.0-...-5700d3e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromImageInfo

func FromImageInfo(altText, url string) string

FromImageInfo generates a slug from image metadata Tries alt text first, then falls back to URL

func FromImageURL

func FromImageURL(url string) string

FromImageURL generates a slug from an image URL Extracts the filename without extension and creates a slug

func Generate

func Generate(s string) string

Generate creates a URL-friendly slug from a string

func GenerateWithFallback

func GenerateWithFallback(s, fallback string) string

GenerateWithFallback generates a slug, falling back to a default if the input produces an empty slug

func MakeUnique

func MakeUnique(slug string, counter int) string

MakeUnique appends a number to a slug to make it unique

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL