You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Replace Slugify.Core with our own slug method #4835
Replace the Slugify.Core package with a small slug method in Elastic.Documentation, so slugs stay the same across package upgrades and the package stops blocking bumps.
What is getting in your way
Slugify.Core 5.x no longer accepts a null argument, while StringExtensions.Slugify(this string? text) takes a nullable string. The upgrade does not compile without a workaround that hides a behaviour change, so #4834 keeps the package on 4.0.1. The slugs feed anchors, heading ids and changelog links, so a silent change in them breaks links.
What would you like instead
One slug method in Elastic.Documentation that defines the rules we depend on (case, separators, diacritics, null and empty input) and a test that pins them. Move the callers of SlugHelper.GenerateSlug and .Slugify() to it. These are in Elastic.Markdown, Elastic.Documentation, Elastic.Changelog and Elastic.LegacyDocs.Migration. Then remove the Slugify.Core reference.
Anything else
Before replacing it, write tests against 4.0.1 that capture its current output for the headings in docs/, so the new method can be shown to produce identical slugs.
Activity