redhataccess / ascii_binder

AsciiBinder is an AsciiDoc-based system for authoring and publishing closely related documentation sets from a single source.
https://asciibinder.net
MIT License
76 stars 39 forks source link

Add sorting to the list of topic map files #172

Open gabriel-rh opened 2 years ago

gabriel-rh commented 2 years ago

Simply adding sorting when processing the list of topic map files, would allow us to split us the humongous _topic_map.yml file into multiple smaller files with one map for each book:

        Dir.glob("#{topic_map_folder}/*.yml").sort.each do |filename|

instead of:

        Dir.glob("#{topic_map_folder}/*.yml").each do |filename|

We could split the map, naming the files so that they would sort in the correct order (and allow additions/reorgs without needing to rename):

0010_welcome.yml                          0130_authentication.yml        0250_logging.yml
0020_whats_new.yml                        0140_networking.yml            0260_monitoring.yml
0030_release_notes.yml                    0150_storage.yml               0270_scalability_and_performance.yml
0040_getting_started.yml                  0160_registry.yml              0280_hardware_enablement.yml
0050_architecture.yml                     0170_operators.yml             0290_backup_and_restore.yml
0060_installing.yml                       0180_cicd.yml                  0300_migrating_from_ocp_3_to_4.yml
0070_post_installation_configuration.yml  0190_openshift_images.yml      0310_migration_toolkit_for_containers.yml
0080_updating.yml                         0200_applications.yml          0320_rest_api.yml
0090_support.yml                          0210_machine_management.yml    0330_service_mesh.yml
0100_web_console.yml                      0220_nodes.yml                 0340_distr_tracing.yml
0110_cli_reference.yml                    0230_windows_containers.yml    0350_virt.yml
0120_security.yml                         0240_sandboxed_containers.yml  0360_serverless.yml

As well as improving usability by having smaller (modular) topic maps, it would ultimately help enable rendering individual books, rather than the full >>2GB previews that ends up being very expensive for hosting purposes...

rohennes commented 2 years ago

Using @gabriel-rh's container image with his updated version of asciibinder, I verified the fixes worked as expected. Note: I was able to also build using the split maps using my local build.