boston-library / commonwealth-vlr-engine

Commonwealth-VLR-Engine is a Rails engine for creating Blacklight apps that provide access to content from Solr/Fedora, packaging a number of feature-rich enhancements and modifications.
Apache License 2.0
8 stars 2 forks source link

integrate blacklight_dynamic_sitemap gem #68

Open ebenenglish opened 2 years ago

ebenenglish commented 2 years ago

To provide better search engine indexing and reduce the amount of traffic on search/facet pages, we should implement a sitemap.

The blacklight_dynamic_sitemap gem offers useful functionality for this. The installer basically just adds this line to the app's config/routes.rb file, which could easily be emulated in commonwealth-vlr-engine's installer:

mount BlacklightDynamicSitemap::Engine => '/'

However, there are some drawbacks specific to our use case:

  1. collection and institution pages are indexed as "regular" Solr documents (/search/ark_id) rather than their distinct classes (e.g. /collections/ark_id)
  2. static pages are not included

The first issue may be solvable by overriding some code from the gem, not sure how difficult that will be.

The second issue will take more wrangling, we may want to include a controller-level callback to dynamically include the static pages, maybe using a YAML file as the data source for the URLs to be included. That list could easily be maintained in downstream applications.

Other considerations: