-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement: more configurable collection path #340
Comments
Noted on the use case here 👍 We're pretty keen on keeping slugs static (i.e not having a function you need to call in order to know where entries live) because we need to load the content directly from GitHub over their API, and knowing that as part of static config is very helpful. The challenge with allowing a function to define it is that it becomes non-deterministic, while that's not the case in your examples above, there'd be nothing stopping you from doing:
... chaos 💥 However we've discussed supporting support multiple
What do you think? sound useful? can you see any limitations with this approach, if we added it, that you couldn't work around? |
Sounds good 👍, a few thoughts:
Right now, Wdyt? |
I had a chat with the team today about it, and there's some nuance that we need to solve, but I've put it on the roadmap. I like your idea about using the name of the field in the path too, we'll see what we can come up with and whether that's possible 🙂 Can you expand a bit more on what you mean by "it should be applied for usage with document fields" too? |
Awesome thanks! My bad, I just checked my schema and I thought putting |
Hey @JedWatson, hope you're doing well! Do you have any ETA about this? Or could I help in any way, maybe with some guidance? It has become a must for the project I'm working on and I can dedicate a bit of time to make changes to keystatic |
@JedWatson have a look at https://www.typescriptlang.org/play#code/C4TwDgpgBAxgFhGBrACgQ2HAPAZQDYCuA5lBAB7AQB2AJgM5R3ABOAllUQDRQAqpF1eoxbsiAPigBeKAG18xALr9KtBjIBQUKPJLkVQtFRBQA-FAAUfPYIYADACQBvQyAC+9pzvfOjr26e1CEgAuKCoIADcIZgBKKFDwqOZ1BU0AnjSEyOiAbnV1GAB7KiZYZggMCABhQrw8RGBWYqkoXCDlG2E2Dm50TA7VLtExczS6IIAxVgg8elCdGQVONLAMOFD4RFQ1tuJetbF1GNCIwtYaKQlHVzyC4tKyFphyypq6hqaqcxkAIjQf7g-ABGPyWUB+eEK5QAtgBaVhgOgEaEAensaBRADNCoUgWhmD8YnkgA Credits to SuperKXT on Matt's TS Wizards Discord server |
This comment was marked as outdated.
This comment was marked as outdated.
Hi is this issue still available to be worked on? Would love to give it a shot :) |
cc @JedWatson |
@florian-lefebvre any updates? |
nope, I'm not on the team so waiting for an answer as well |
@algora-pbc Can you add a bounty label for issue? |
That's a bot, I think labelling has to be done by the keystatic team if they wish |
Is this open to work? Would love to crush this. |
@JedWatson Any updates? |
Current state
Currently, the path is always static except for the slug, specified by
slugField
.The problem
Projects often require more custom paths, e.g.: locales, publish date
Proposal
Make the collection config an intersection like so (pseudocode):
Examples
Locales
Publish date
The text was updated successfully, but these errors were encountered: