Add guardrail against duplicate slugs

This commit is contained in:
Nathan McCarty 2025-02-06 20:32:38 -05:00
parent 3f59c75523
commit b067f79e1c
2 changed files with 8 additions and 1 deletions

View file

@ -63,7 +63,8 @@ method all-slugs(--> Array[Str:D]) {
my Str:D @slugs = @!slugs.clone;
@slugs.push($long-title-slug);
@slugs.push($six-word-slug);
@slugs;
@slugs.=unique;
@slugs
}
#| Render this post to an html body