From 621c9aabedc16ec6a5878ece381816cf8e44670a Mon Sep 17 00:00:00 2001 From: Jeremy Friesen Date: Thu, 21 Dec 2023 11:29:30 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Adding=20document=5Fcomponent=20?= =?UTF-8?q?to=20blacklight's=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Blacklight 7.35.0 's default document_component is `nil`, see: - https://github.com/projectblacklight/blacklight/blob/ac5fa8b300c5ad5c35b1663ef0f15372ffa2be0f/lib/blacklight/configuration.rb#L213 - https://github.com/projectblacklight/blacklight/blob/ac5fa8b300c5ad5c35b1663ef0f15372ffa2be0f/lib/blacklight/configuration.rb#L186 Digging around in the wiki, you might find (only found because I cloned the repo): - https://github.com/projectblacklight/blacklight/wiki/Configuration---Results-View Related to: - https://github.com/projectblacklight/blacklight/pull/2317 --- app/controllers/catalog_controller.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/controllers/catalog_controller.rb b/app/controllers/catalog_controller.rb index 93d0ddf91..e6d67c2d1 100644 --- a/app/controllers/catalog_controller.rb +++ b/app/controllers/catalog_controller.rb @@ -35,6 +35,18 @@ def self.uploaded_field include BlacklightIiifSearch::Controller configure_blacklight do |config| + ## + # Blacklight 7.35.0 's default document_component is `nil`, see: + # + # - https://github.com/projectblacklight/blacklight/blob/ac5fa8b300c5ad5c35b1663ef0f15372ffa2be0f/lib/blacklight/configuration.rb#L213 + # - https://github.com/projectblacklight/blacklight/blob/ac5fa8b300c5ad5c35b1663ef0f15372ffa2be0f/lib/blacklight/configuration.rb#L186 + # + # Digging around in the wiki, you might find (only found because I cloned the repo): + # + # - https://github.com/projectblacklight/blacklight/wiki/Configuration---Results-View + config.index.document_component = Blacklight::DocumentComponent + config.show.document_component = Blacklight::DocumentComponent + # IiifPrint index fields config.add_index_field 'all_text_timv' config.add_index_field 'file_set_text_tsimv', label: "Item contents", highlight: true, helper_method: :render_ocr_snippets