Hierarchy (sub directory) in Wiki #314

Open
opened 2025-11-02 03:18:12 -06:00 by GiteaMirror · 21 comments
Owner

Originally created by @MorphBonehunter on GitHub (Feb 2, 2017).

Feature Description

This Feature Request is about Support for Hierarchy/Subdirectories in Gitea Wiki. That includes below content.

  • Files Can be Put in Subdirectories from UI or git client side
  • Files In Subdirectories can be normally Visited from UI and git client side
  • Files In Subdirectories can be normally Linked in Markdown to
  • Subdirectories pages can be listed in the Pages View.
  • Files Renamed in Sudirs stay in them. (API support for Subdirs)
  • / in File names is interpreted as Path/folder even if it's in a Windows OS

Why the feature is necessary

I think Support for Subdirectories is a Great Feature, because:

  • It helps to bring better structure into a Wiki, especially for those big wiki
  • It would work with a lot of Tools Out of the Box like: Obsidian and Logseq
Originally created by @MorphBonehunter on GitHub (Feb 2, 2017). ### Feature Description This Feature Request is about Support for Hierarchy/Subdirectories in Gitea Wiki. That includes below content. - [ ] Files Can be Put in Subdirectories from UI or git client side - [ ] Files In Subdirectories can be normally Visited from UI and git client side - [ ] Files In Subdirectories can be normally Linked in Markdown to - [ ] Subdirectories pages can be listed in the Pages View. - [ ] Files Renamed in Sudirs stay in them. (API support for Subdirs) - [ ] / in File names is interpreted as Path/folder even if it's in a Windows OS ### Why the feature is necessary I think Support for Subdirectories is a Great Feature, because: - It helps to bring better structure into a Wiki, especially for those big wiki - It would work with a lot of Tools Out of the Box like: Obsidian and Logseq
GiteaMirror added the topic/wikiissue/confirmedtype/feature labels 2025-11-02 03:18:12 -06:00
Author
Owner

@lunny commented on GitHub (May 4, 2017):

do you mean #822 ?

@lunny commented on GitHub (May 4, 2017): do you mean #822 ?
Author
Owner

@MorphBonehunter commented on GitHub (May 5, 2017):

@lunny: no, #822 is about table of content, this here is about "Subdirectorys" in wiki.
Maybe it is easier to explain if you could please take a look at https://github.com/gogits/gogs/issues/3087 as this describes it realy well in my eyes.

@MorphBonehunter commented on GitHub (May 5, 2017): @lunny: no, #822 is about table of content, this here is about "Subdirectorys" in wiki. Maybe it is easier to explain if you could please take a look at https://github.com/gogits/gogs/issues/3087 as this describes it realy well in my eyes.
Author
Owner

@lunny commented on GitHub (May 5, 2017):

@MorphBonehunter oh. I see.

@lunny commented on GitHub (May 5, 2017): @MorphBonehunter oh. I see.
Author
Owner

@dakira commented on GitHub (Feb 13, 2018):

Compared to Github this is actually a bug, I would say. I create subdirectories, in contrast to github, they're just irgnored, though.

@dakira commented on GitHub (Feb 13, 2018): Compared to Github this is actually a bug, I would say. I create subdirectories, in contrast to github, they're just irgnored, though.
Author
Owner

@stale[bot] commented on GitHub (Feb 8, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Feb 8, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@pinpox commented on GitHub (Feb 13, 2019):

This would be greatly appreciated and probably not too hard to implement. Using a wiki with +300 pages is a pain without folders

@pinpox commented on GitHub (Feb 13, 2019): This would be greatly appreciated and probably not too hard to implement. Using a wiki with +300 pages is a pain without folders
Author
Owner

@ghost commented on GitHub (May 14, 2019):

Nice! That would be really great. I also have quite a few pages which isn't clear to read without folders.

@ghost commented on GitHub (May 14, 2019): Nice! That would be really great. I also have quite a few pages which isn't clear to read without folders.
Author
Owner

@Cherrg commented on GitHub (Jun 13, 2019):

Some modification on my script for #822 gives following:

grafik

This hijacks the page select/search and generates the page tree with this data.
The container is only shown on large screens >1760px -> there is no place for the container otherwise

Is more needed? Otherwise I could create an pull request. (If #822 is done)

@Cherrg commented on GitHub (Jun 13, 2019): Some modification on my script for #822 gives following: ![grafik](https://user-images.githubusercontent.com/24939127/59404893-b14ac400-8da8-11e9-96f0-6c28fd7b377f.png) This hijacks the page select/search and generates the page tree with this data. The container is only shown on large screens >1760px -> there is no place for the container otherwise **Is more needed?** Otherwise I could create an pull request. (If #822 is done)
Author
Owner

@pinpox commented on GitHub (Jun 13, 2019):

Some modification on my script for #822 gives following:

grafik

This hijacks the page select/search and generates the page tree with this data.
The container is only shown on large screens >1760px -> there is no place for the container otherwise

Is more needed? Otherwise I could create an pull request. (If #822 is done)

This is really nice, but not the whole thing. Having real folders allows to clone the wiki repo itself and work on it. This is actually quite usefull for lager wikis and makes import/export of .md files easy

@pinpox commented on GitHub (Jun 13, 2019): > Some modification on my script for #822 gives following: > > ![grafik](https://user-images.githubusercontent.com/24939127/59404893-b14ac400-8da8-11e9-96f0-6c28fd7b377f.png) > > This hijacks the page select/search and generates the page tree with this data. > The container is only shown on large screens >1760px -> there is no place for the container otherwise > > **Is more needed?** Otherwise I could create an pull request. (If #822 is done) This is really nice, but not the whole thing. Having real folders allows to clone the wiki repo itself and work on it. This is actually quite usefull for lager wikis and makes import/export of .md files easy
Author
Owner

@Cherrg commented on GitHub (Jun 13, 2019):

done some coding, so its now possible to render wiki pages from directories. Create/update/delete pages works well. If an old page is updated, the page will be moved to subdirectory.

grafik

(Red is a is an error in repository -> file exists in old and new wiki file structure)

Images
currently the images are weird:

  • external images: working
  • use absolute path: working
  • use relative path:
    • currently the path has to be relative to <giteaurl>/<user>/<repo>/<wiki>/ -> also on every wiki sub page
    • i could try to add some JS to rewrite relative urls on rendered wiki pages
      • I think thats a bad idea -> toggle JS on/off will enable/disable working images
        -> so there need to be an update on wiki renderer
        -> Any better suggestions?

Does anyone has a good idea where to place the 'table of pages/wiki tree' on small screens?

@Cherrg commented on GitHub (Jun 13, 2019): done some coding, so its now possible to render wiki pages from directories. Create/update/delete pages works well. If an old page is updated, the page will be moved to subdirectory. ![grafik](https://user-images.githubusercontent.com/24939127/59468267-e5b69280-8e31-11e9-9d06-a3778807c3c0.png) (Red is a is an error in repository -> file exists in old and new wiki file structure) **Images** currently the images are weird: - external images: working - use absolute path: working - use relative path: - currently the path has to be relative to `<giteaurl>/<user>/<repo>/<wiki>/` -> also on every wiki sub page - i could try to add some JS to rewrite relative urls on rendered wiki pages - I think thats a bad idea -> toggle JS on/off will enable/disable working images -> so there need to be an update on wiki renderer -> **Any better suggestions?** **Does anyone has a good idea where to place the 'table of pages/wiki tree' on small screens?**
Author
Owner

@Cherrg commented on GitHub (Jun 13, 2019):

You could try it out on this branch: https://github.com/Cherrg/gitea/tree/gitea_wiki_page_toc
I will create an PR if #822 is done

@Cherrg commented on GitHub (Jun 13, 2019): You could try it out on this branch: https://github.com/Cherrg/gitea/tree/gitea_wiki_page_toc I will create an PR if #822 is done
Author
Owner

@Cherrg commented on GitHub (Jun 18, 2019):

Found some solutions for both questions, see images in pull request.

@Cherrg commented on GitHub (Jun 18, 2019): Found some solutions for both questions, see images in pull request.
Author
Owner

@ivptr commented on GitHub (Jan 10, 2022):

Any update on this? This could be a good solution for migration from Confluence.

@ivptr commented on GitHub (Jan 10, 2022): Any update on this? This could be a good solution for migration from Confluence.
Author
Owner

@lunny commented on GitHub (Jan 12, 2022):

Any update on this? This could be a good solution for migration from Confluence.

You can find a PR in #7225 . But there are some different opinions about how to display the hierarchy tree.

@lunny commented on GitHub (Jan 12, 2022): > Any update on this? This could be a good solution for migration from Confluence. You can find a PR in #7225 . But there are some different opinions about how to display the hierarchy tree.
Author
Owner

@matthias-colt commented on GitHub (Jan 6, 2023):

would be great to get this on the Plans for Gitea 1.19 #21598 at least, if it can be added in 1.18

@matthias-colt commented on GitHub (Jan 6, 2023): would be great to get this on the Plans for Gitea 1.19 #21598 at least, if it can be added in 1.18
Author
Owner

@pcone commented on GitHub (Sep 8, 2023):

Please consider hierarchical pages rather than a structure where folders and pages are treated differently.

By this I mean pages would have a tree structure with parents and children, but parent nodes have page content just like children do.

See the wiki system in Azure DevOps for an example of this behaviour.

@pcone commented on GitHub (Sep 8, 2023): Please consider hierarchical pages rather than a structure where folders and pages are treated differently. By this I mean pages would have a tree structure with parents and children, but parent nodes have page content just like children do. See the wiki system in Azure DevOps for an example of this behaviour.
Author
Owner

@VAllens commented on GitHub (Feb 13, 2025):

I believe the sub-directory feature of the wiki is important to most users.
Has it progressed since this issue was raised in 2017?

@VAllens commented on GitHub (Feb 13, 2025): I believe the sub-directory feature of the wiki is important to most users. Has it progressed since this issue was raised in 2017?
Author
Owner

@lunny commented on GitHub (Feb 13, 2025):

There are several pull requests, including mine (#33000), but none have been merged due to certain defects.

@lunny commented on GitHub (Feb 13, 2025): There are several pull requests, including mine (#33000), but none have been merged due to certain defects.
Author
Owner

@sgabenov commented on GitHub (Feb 20, 2025):

When it is planed to be implemented?

@sgabenov commented on GitHub (Feb 20, 2025): When it is planed to be implemented?
Author
Owner

@VAllens commented on GitHub (Apr 23, 2025):

When it is planed to be implemented?

@VAllens commented on GitHub (Apr 23, 2025): When it is planed to be implemented?
Author
Owner

@wxiaoguang commented on GitHub (Apr 23, 2025):

When it is planed to be implemented?

When someone has the ability and time and interest to do it, since open-source project features are crowd-driven.

@wxiaoguang commented on GitHub (Apr 23, 2025): > When it is planed to be implemented? When someone has the ability and time and interest to do it, since open-source project features are crowd-driven.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#314