-
Notifications
You must be signed in to change notification settings - Fork 26
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
Traversing subdirectories #16
Comments
Thanks! I have indeed been thinking about this (or rather, something adjacent to this) for a bit. I was looking to implement "directories as categories", similar to cgit's
they'd then show up under those respective subheadings in the repo index. A visual example for what I'm describing can be seen in this cgit instance: https://git.peppe.rs (notice "cli", "config", ...). With that preface out of the way,
this is a fair assumption. Having one level of traversal was also what I had in mind for the above feature. |
I have a basic implementation of "directories as categories", but it doesn't work well with also having top-level repositories. cgit does support this mode of displaying repositories, but from what I can tell, it does not actually traverse subdirectories and rather is just a per-repo configuration in If anyone has an idea of how to implement this (I did try simply having both |
Hi, so there's an existing PR that implements category support but in its current state it breaks clones. I haven't quite figured out how to make it work but perhaps it might serve as a starting point? |
I'll take a look at that, thanks! |
First off, thanks for legit, it's rather neat!
I was looking at how to make it support traversing subdirectories and so far I have the necessary infrastructure in place that would let me do this, including being able to limit the recursion depth.
The problem I'm running into is flow and its URL path handling:
Unsurprisingly,
/:name
only captures a single segment. But when you have subdirectories you need either/:parent/:name
or/:name
. If I can assume there's only max 1 parent this can be solved without much trouble. But if there's a desire to allow for an arbitrary path depth it becomes problematic as the wildcard...
can only be used once and only at the end of a path. I'm not sure how to consume multiple path segments.I'm wondering if you've given any thought around how to solve this?
The text was updated successfully, but these errors were encountered: