URL slugs
A URL slug is the unique part of the address that identifies a specific document or category. In Jadu Central, unique slugs are generated for each document and category in the content management system.
Slug generation
Slugs for new content are automatically assigned by event listeners in the background of the application, as illustrated below:
Content type | Event triggering generation | Event triggering deletion |
---|---|---|
Document | document.save When the document is first saved. | document.delete When the document is deleted. |
Category | categorylist.published When a category list containing the category is first published. | categorylist.published When a category list not containing the category is first published. |
Slug format
Slugs are based on the title of a document or name of a category. Each slug is unique. Documents with the same title will have a unique slug.
The following rules are followed when generating a slug:
- Spaces in the title will be replaced by dashes
- Stop words will be removed from the title, unless the title consists solely of stop words
- The title is changed to lowercase
- Special characters are removed
Stop words (like “the,” “in,” and “a”) are common words that search engines may ignore in search queries and search results. Because they don’t affect the meaning of the query or content.
They’re typically articles, prepositions, conjunctions, or pronouns used for grammatical purposes—not because they communicate a lot of meaning.
Content title | Generated slug |
---|---|
Example Title | example-title |
Election results - General Election 2017 | election-results-general-election-2017 |
Switch to e-billing and you could win up to $500 off your council tax bill | switch-e-billing-win-500-off-council-tax-bill |
Join the Pick Up for Pendle team! | join-pick-pendle-team |