Short pathes #2052
stereobooster
started this conversation in
Feature Requests
Short pathes
#2052
Replies: 2 comments 3 replies
-
Hi, @stereobooster ! Would Astro redirects work for you? This would allow you to have the structure you're wanting while retaining the same file structure (or the opposite scenario!) |
Beta Was this translation helpful? Give feedback.
1 reply
-
In this area Starlight is mostly limited by how Astro itself manages slugs etc. with content collections. Might be something that could become more flexible with Astro’s work on a new “content layer” API extending content collections — withastro/roadmap#946 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What version of
starlight
are you using?0.24.0
What is your idea?
Ability to configure Starlight to use "short" urls. For example, if I have following files structure:
I want Starlight to generate URLs like this:
/backlinks
instead of/reciepes/backlinks
/diagrams
instead of/reciepes/diagrams
But the same time I would like sidebar to preserve structure.
I can achieve this by using
slug
in frontmatter:But I was wondering, if there is a way to make this configuration, so I would not need to place it in every file. Maybe I can configure Astro content (schema) some how?
Why is this feature necessary?
Because I want to move files around without breaking URLs. I could theoretically dump all files at root level, but in this case Sidebar looks pretty bad.
And yes I know that I would need to make sure to have unique file names in this case. And probably this is not the feature that a lot of people would use. But a workaround or plugin would do too - not necessary built-in feature.
Do you have examples of this feature in other projects?
No response
Participation
Beta Was this translation helpful? Give feedback.
All reactions