Ruby HTML JavaScript XSLT CSS Shell
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app Update to rubocop 0.56.0 May 15, 2018
config Move the facet navigation 'clear filters' button inside the nav and r… Apr 3, 2018
db/migrate Add Rails migration compatibility version to migrations Apr 25, 2017
lib Compile javascript assets (#1727) Mar 30, 2018
spec Move the facet navigation 'clear filters' button inside the nav and r… Apr 3, 2018
tasks Force the use of Solr 7.1 until we can accomodate 7.2 (#1821) Jan 7, 2018
.gitignore Compile javascript assets (#1727) Mar 30, 2018
.hound.yml Specify AirBnb javascript style guide Jul 8, 2015
.jshintrc remove comments for valid json (#1668) Apr 20, 2017
.npmignore Compile javascript assets (#1727) Mar 30, 2018
.rspec Clean up rspec files (#1437) Jul 12, 2016
.rubocop.yml Update to rubocop 0.56.0 May 15, 2018
.rubocop_todo.yml Fix a hanging rubocop enable comment and re-run auto-gen-config. Mar 28, 2018
.solr_wrapper.yml add a project solr_wrapper for developper happiness Mar 29, 2018
.travis.yml Merge pull request #1865 from projectblacklight/capybara3 Apr 10, 2018
.yardopts Fix malformed YARD tags; fixes #1476 Sep 1, 2016
Gemfile Use ruby 1.9 style hash keys (#1774) Oct 18, 2017
LICENSE Update LICENSE with current year Sep 17, 2016
README.md Compile javascript assets (#1727) Mar 30, 2018
Rakefile Remove unnecessary encoding comment Jan 19, 2018
VERSION Bump version to 7.0.0.rc1 Mar 30, 2018
Vagrantfile Address some rubocop violations Sep 1, 2016
blacklight.gemspec Update to rubocop 0.56.0 May 15, 2018
package-lock.json Compile javascript assets (#1727) Mar 30, 2018
package.json Compile javascript assets (#1727) Mar 30, 2018
provision.sh update to Java 8 and add some documentation to the vagrant provision … Nov 9, 2015
template.demo.rb Update template to not index data on execution Dec 2, 2016

README.md

Blacklight

Build Status Gem Version Coverage Status

Blacklight is an open source Solr user interface discovery platform. You can use Blacklight to enable searching and browsing of your collections. Blacklight uses the Apache Solr search engine to search full text and/or metadata. Blacklight has a highly configurable Ruby on Rails front-end. Blacklight was originally developed at the University of Virginia Library and is made public under an Apache 2.0 license.

Installation

Add Blacklight to your Gemfile:

gem "blacklight"

Run the install generator which will copy over some initial templates, migrations, routes, and configuration:

rails generate blacklight:install

Documentation, Information and Support

Dependencies

  • Ruby 2.1+
  • Bundler
  • Rails 5.0+

Configuring Apache Solr

You'll also want some information about how Blacklight expects Apache Solr to run, which you can find in README_SOLR

Building the javascript

The javascript is built by npm from sources in app/javascript into a bundle in app/assets/javascripts/blacklight/blacklight.js. This file should not be edited by hand as any changes would be overwritten. When any of the javascript components in the gem are changed, this bundle should be rebuild with the following steps:

  1. Install npm
  2. run npm install to download dependencies
  3. run npm run js-compile-bundle to build the bundle
  4. run npm publish to push the javascript package to https://npmjs.org/package/blacklight-frontend

Using the javascript

Blacklight ships with Javascript that can be compiled either by Webpacker or by Sprockets. To use Webpacker see the directions at https://github.com/projectblacklight/blacklight/wiki/Using-Webpacker-to-compile-javascript-assets

If you prefer to use Sprockets, simply run the install generator, which will run the assets generator. For details see https://github.com/projectblacklight/blacklight/wiki/Using-Sprockets-to-compile-javascript-assets