LightGuard / asciidoc-splitter

A splitter utility for helping create modular docs from chapter files.
BSD 2-Clause "Simplified" License
8 stars 8 forks source link

Maintain chapter subdirectories so that split modules are in the same level of subdirectories #78

Closed sterobin closed 3 years ago

sterobin commented 3 years ago

Current behavior

When a chapter folder contains both a chapter file and a subdirectory, OR if the chapter folder contains one or more subdirectories that themselves contain various chapter folders, the splitter flattens the subfolder structure and makes all subfolders just equal parent folders in the modules folder after the split.

For example, the Kogito source release notes folder contains the chap file and an enterprise subfolder dedicated to the enterprise chapter file, and this enterprise folder is treated as it's own folder in the split release notes folder instead of being a subfolder within that folder. This is necessary because the enterprise version of the RN is too different from the community version to rely on conditions (enterprise includes 4 community release, and follows a different format altogether).

Target behavior

Maintain directory structure but just convert the existing chap file to module files in place as expected.

Example, convert this folder structure:

 ── doc-content
   └── release-notes
       ├── chap-release-notes.adoc
       ├── enteprise
           └── chap-release-notes-enterprise.adoc

To this:

 ── modules
   └── release-notes
       ├── (module)
       ├── (module)
        ── ...
       ├── enteprise
           ├── (module)
           ├── (module)
           ├── ...

Instead of this, as it does today:

 ── modules
   └── release-notes
       ├── (module)
       ├── (module)
   └── enterprise
       ├── (module)
       ├── (module)
       ├── ...

Resources