Skip to content

Feature Request: Index File Refactoring Support #19

@Mearman

Description

@Mearman

Feature Request: Index File Refactoring Support

Problem

Currently, markmv supports moving, splitting, joining, and generating documentation indexes, but lacks functionality to refactor content between different index file types (e.g., README.md ↔ index.md).

Proposed Solution

Add functionality to support refactoring between different index files with automatic link updates and content preservation.

Use Cases

  1. README.md to index.md: Convert project README files to index files for documentation systems
  2. index.md to README.md: Convert documentation index files back to standard README format
  3. Cross-format migration: Support migration between different documentation conventions

Suggested Implementation

  • Add refactorIndex() function with source/target file type detection
  • Maintain all existing link updating capabilities
  • Preserve content structure and formatting
  • Handle metadata and frontmatter appropriately
  • Support bidirectional conversion

Example Usage

// Convert README.md to index.md
await refactorIndex('README.md', 'index.md');

// Convert index.md to README.md  
await refactorIndex('index.md', 'README.md');

Additional Context

This would complement the existing file operations and documentation generation features, providing a complete solution for documentation file management across different naming conventions and project structures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions