-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
New list type: File tree #7761
Comments
Thanks for suggesting. I'm not sure how many users would need this, and how the syntax/markup for this would look, but we can leave it open for a while to see if others would find it useful as well. |
I haven't ever wanted this, but as a supporting example of where this could be used, see the file trees for project layouts in uv (rendered here — preferring the unrendered version as this could go out of date). The example above sure does look prettier. It sounds like more work for me to maintain than running |
This would be great! So far, I have used code blocks to display folder structures (e.g. here), having nice icons would make this even better! |
We're planning to introduce a component-centric approach, very likely next year. The "when" depends on how fast we're with our foundational work, but we definitely want to make componentization easier, which would allow to implement a component like this and use it in different themes – not only in Material for MkDocs. |
Just found this issue. Have a look at https://pawamoy.github.io/markdown-exec/usage/tree/. It doesn't allow collapsing/expanding folders, but this could be achieved with a bit of Javascript, probably. You can already push it quite far, see https://pawamoy.github.io/markdown-exec/gallery/#file-trees and https://mkdocstrings.github.io/griffe/guide/contributors/architecture/#project-architecture (source). |
In a Hugo document theme named Hextra, I have seen good implementation: https://imfing.github.io/hextra/docs/guide/shortcodes/filetree, would like to see if MkDocs also has one. |
Context
https://squidfunk.github.io/mkdocs-material/reference/lists/
Description
It would be nice to offer a way to display a directory-like structure.
Related links
https://starlight.astro.build/components/file-tree/
Use Cases
This would solve the issue of displaying how a folder should be structured without manual formatting or manual local creation in order to run the
tree
command which requires special flags and is not available on Windows. The second approach also doesn't give you icons for different extension types unless you set up your terminal with Nerd Fonts and sometimes those do not copy/paste well.Visuals
Before submitting
The text was updated successfully, but these errors were encountered: