Created
August 6, 2019 07:52
-
-
Save mankind/5abcc4bbcdb7e2b6aa38363f8e0b55d0 to your computer and use it in GitHub Desktop.
oai_exporting repository_url
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#file location | |
#app/controllers/ubiquity/oai_extension.rb | |
module Ubiquity | |
module OaiExtension | |
extend ActiveSupport::Concern | |
def oai_config | |
blacklight_config.oai.merge(provider: {repository_url: request.original_url}) || {provider: {repository_url: request.original_url}} | |
end | |
end | |
end | |
#changes config/application.rb | |
CatalogController.prepend(::Ubiquity::OaiExtension) | |
#####changes to catalog controller | |
#we removed repository_url: CurrentScope.user_tenant_cname | |
config.oai = { | |
provider: { | |
repository_name: Settings.oai.name | |
}, | |
document: { | |
limit: 25, # number of records returned with each request, default: 15 | |
set_fields: [ # ability to define ListSets, optional, default: nil | |
{ label: 'collection', solr_field: 'isPartOf_ssim' } | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment