UB-Mannheim / kitodo-presentation-docker

Docker configuration for Kitodo.Presentation
GNU General Public License v3.0
4 stars 3 forks source link

Add routeEnhancer rule to make urls more readable #30

Closed csidirop closed 5 months ago

csidirop commented 1 year ago

Adding the routeEnhancer rule to the site config make urls more readable. As site effect non-specialist users can simply read and change the urls.

Example:

-->

At this point not all sites redirect correctly to the new scheme and on top some errors found on the log. If this feature is interesting or wanted, they will be fixed. only the fixed links on the main site still lead to the old scheme. This can be changed if wanted. All other sites redirect automatic to the the scheme, even if they have the old one.

After manually updating the config file you should delete the caches. Open the example page and click on any button that adds an parameter, like doublepage, gridview or just go one site forward.

Additionally it is possible to use language specific URLs. E.g. for german: .../seite-150/...

routePath: '/{id}/{localized_page}-{page}/{pagegrid}-{double}'
...
 aspects:
   localized_page:
     type: LocaleModifier
     default: 'page'
     localeMap:
       - locale: 'en_US.*'
          value: 'page'
       - locale: 'de_DE.*'
          value: 'seite'
csidirop commented 1 year ago

Updated description

csidirop commented 1 year ago

For better recognition and differentiation of the METS link within the entire URL, url= can also be placed in front of the link: http://localhost/viewer/url=https://digi.bib.uni-mannheim.de/fileadmin/vl/ubmaosi/59088/59088.xml/page-150

routePath: '/url={id}/page-{page}/{pagegrid}-{double}'

csidirop commented 5 months ago

Implemented with https://github.com/UB-Mannheim/kitodo-presentation-docker/commit/b095206d5ea569fcec0f3d0cb2c4d17dda5eb351 and https://github.com/UB-Mannheim/kitodo-presentation-docker/commit/3575e134ac9ce60071369bc139ee492fa8a7e090