Skip to content

Handle same slugs at different positions in a structure #714

@jasonvarga

Description

@jasonvarga

It's reasonable to want two different pages to have the same slug in different positions in a structure. I even just ran into it in our docs.

|-- Fieldtypes
|-- Extending
    |-- Fieldtypes

Since the slug is coming from the filename of the entry, it needs to be unique.
But the URLs are intended to be different.

Technically they could have different slugs, then have a separate field that overrides the slugs. eg fieldtypes.md and extending-fieldtypes.md with a slug_override: fieldtypes. Then the route could be {{ parent_uri }}/{{ slug_override or slug }}.

Not very elegant though. Can do better.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions