By introducing a setting to override metadata displays, such as a checkbox “Use file-based metadata displays,” and providing an absolute path to the relevant file, users can gain flexibility in how they manage metadata. Additionally, a separate textarea could allow users to add an include statement to the Twig file (e.g., {{ include '@theme/metadatadisplay_xyz.html.twig' }}), enabling both the use of the UI for content changes and the option to work in an IDE with full GIT-versioning support.
This setup could be applied globally within the Archipelago backend or on a per-Metadatadisplay basis. In “classic” mode, the UI would overwrite file-based metadata displays, ensuring compatibility with updates. Saving changes in the GUI would also update the underlying files, making them visible as modified in GIT. For having full control, the option to link save operations with file changes could be controlled through a separate setting.