Support for Folders
📁 Add support for Confluence Folders
Implements support for the new Confluence Folders feature announced by Atlassian, allowing better organization of wiki content through folder hierarchies.
🎯 Problem Solved
Resolves #539 - Users requested the ability to organize Confluence pages using the new Folders feature instead of relying solely on parent pages.
🚀 What's New
- Folder Metadata Support: New
<!-- Folder: -->header syntax for specifying folder hierarchies - Mixed Hierarchies: Support for combining folders and parent pages in the same structure
- Auto-Creation: Folders are automatically created if they don't exist (similar to parent pages)
- API Integration: Full integration with Confluence v2 REST API for folder operations
📖 Usage Example
<!-- Space: DOCS -->
<!-- Folder: Team A -->
<!-- Folder: Projects -->
<!-- Folder: 2024 -->
<!-- Title: Project Alpha -->
<!-- Parent: Meeting Notes -->
# Project Alpha
This page will be created under: Space DOCS → Team A → Projects → 2024 → Meeting Notes → Project Alpha
🔧 Implementation Details
-
Core Features:
- Parse
<!-- Folder: -->metadata headers - Create folder hierarchies using Confluence v2 API
- Resolve folder/page parent relationships
- Maintain backward compatibility with existing
<!-- Parent: -->syntax
- Parse
-
API Methods Added:
CreateFolder(spaceID, title, parentID)FindFolder(spaceID, title)GetFolderByID(folderID)GetSpaceID(spaceKey)
-
Test Coverage: Comprehensive test suite covering folder parsing, hierarchy creation, and mixed folder/parent scenarios
✅ CI Status
All CI checks are passing:
- Unit Tests: ✅ Enhanced with flexible rendering comparisons for cross-platform compatibility
- Build & Docker: ✅ Clean builds with no issues
- Linting: ✅ Go and Markdown linting pass
- Test Infrastructure: Improved D2/Mermaid test reliability in CI environments
🔄 Backward Compatibility
Fully backward compatible - existing <!-- Parent: --> functionality remains unchanged. Folders and parents can be mixed in the same hierarchy.
Is this feature ready for merging? Just curious. :D
Whats the status of it? want to try
Hello @klauern! I was curious anything else needed to be done before this got merged?
Hey there @hskarlupka! I don't think there's anything blocking at this moment. I did have to rebase off of master some conflicts, but those have been fixed. I have used this internally but not recently.
Our team would also love to use this feature, @mrueg do you think you could re-review when you get a spare moment?
@klauern Thank you for taking care of this feature enhancement. Our team would like to leverage the folder feature. Can you please spare some time to merge this PR?
@klauern thanks for your PR!
I was reviewing the discussion and just wanted to highlight something that might have gone unnoticed: @mrueg requested removing a change in the tests, maybe this is blocking the merging of this valuable PR.
Would you mind updating the PR according to that feedback when you have a moment?
EDIT: sorry, I just noticed you’ve already addressed this in https://github.com/kovetskiy/mark/pull/649/commits/f18e3e42aafeabbd3d5bad7e00fb6f3ea0d04a65.
Thanks again! I hope this change gets released soon.
@klauern thanks for your PR!
I was reviewing the discussion and just wanted to highlight something that might have gone unnoticed: @mrueg requested removing a change in the tests, maybe this is blocking the merging of this valuable PR.
Would you mind updating the PR according to that feedback when you have a moment?
EDIT: sorry, I just noticed you’ve already addressed this in f18e3e4.
Thanks again! I hope this change gets released soon.
Although I welcome new features for this tool, I unfortunately lack the time to review larger features currently. It would give me more confidence if I see reports of users that tested the feature sucessfully in confluence datacenter as well as cloud (I can only test with a confluence instance that doesn't support folders yet).
This would be a great addition