Since we're using Jinja, it should be possible to use extends directives to allow inheriting from a "base" template.
This would make e.g. adding footers/headers and instance branding much easier, since the current solution is to copy-paste and override the entire template in an InvenioRDM overlay (see e.g. CDS templates).
(See also how some of this has been implemented in InvenioILS).