Skip to content

Friendly titles for auto-generated parent pages #67

@klimentyy

Description

@klimentyy

Currently, when the plugin builds the page tree and creates parent pages in Confluence based on the file path, it uses the raw directory name as the Confluence page title.

For example, a file path like modules/arch/pages/ccc/index.adoc results in Confluence parent pages literally named "arch" and "ccc".

Expected Behavior:
It would be highly beneficial if the plugin could either:

  1. Automatically extract the friendly title from the module's nav.adoc or antora.yml.
  2. Provide a configuration option in playbook.yml (e.g., directory-mapper) to map raw folder names to friendly Confluence page titles.

Workaround used:
We temporarily patched PageService.js in the buildPageStructure function to intercept the part variable and map it using a hardcoded dictionary:

// In PageService.js -> buildPageStructure()
const titleMap = {
    "arch": "Architecture",
    "ccc": "Cross-cutting Concepts"
};

// ... inside the parts loop ...
if (i === 0) {
    part = titleMap[parts[i]] || parts[i];
} else {
    part = titleMap[parts[i]] || `[${parts[0]}]-${parts[i]}`;
}

Having native support for this via the playbook configuration would make the resulting Confluence tree much more readable for end-users!

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