webrecorder / pywb

Core Python Web Archiving Toolkit for replay and recording of web archives
https://pypi.python.org/pypi/pywb
GNU General Public License v3.0
1.34k stars 207 forks source link

Make metadata dictionary available in all templates #831

Open despens opened 1 year ago

despens commented 1 year ago

My problem: I would like to display different kinds of error messages per collection when a requested resource is not found. The easiest way to do this would be creating a custom error template and configure per collection via the established metadata.yaml file. Howevert pywb only makes this metadata available in the search.html template, not in other templates, in particular not_found.html.

My proposed solution: make the contents of metadata.yaml available as a dictionary for all templates.

Other solutions I considered: making a custom error handling template for every collection... possible but very laborious.

Additional context: I need to manage lots of different collections :)