Skip to content

Feature Request: Support using markdown file content for folder pages #140

@sheyifan

Description

@sheyifan

Summary

When uploading a directory structure to Confluence, allow folders to have actual content by using a matching markdown file's content instead of creating empty folder pages.

Motivation

Currently, when md2cf processes a directory structure, folders are mapped to empty Confluence pages that only serve as parent pages for their children. This results in:

  • Empty pages that provide no value to readers

Proposed Solution

When a folder and a markdown file at the same level have matching names (i.e., the markdown file's stem matches the folder name), use the markdown file's parsed content and title for the folder page.

Example

Directory structure:

requirements/
├── requirements.md]     # filename stem = "requirements"
├── requirements/     # folder name = "requirements" ✅ Match!
│ └── os.md
└── spec.md

Current behavior:

  • requirements/ → Empty Confluence page with title "requirements"
  • requirements.md → Separate Confluence page (causes title collision if titles match)

Proposed behavior:

  • requirements/ → Confluence page with content from requirements.md
  • The page title is parsed from requirements.md (respects frontmatter, H1 header, or filename fallback)
  • requirements.md is NOT created as a separate page
  • os.md becomes a child page under this folder page

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions