slug is a term leftover from newspapers. You most commonly see slugs today where a title might be "Did you know this mushroom is off the hook?" and the URL is turned in to a "slug" like
example.com/mushroom-off-the-hook/
Here is an example of the Django framework's "slugify" https://github.com/django/django/blob/master/django/utils/te...