Spotlight is intended to enable librarians, curators, and others who are responsible for digital collections to create attractive, feature-rich websites that feature these collections. The curator should be able to use Spotlight to produce a website that highlights a digital collection, drawn from a digital library repository, entirely on his or her own, without programming. The development and ongoing management of the website should be relatively simple and follow familiar conventions for producing online content (e.g., similar to writing and managing a blog or working with a content management system).
To bootstrap a new Rails application:
$ rails new app-name -m https://raw.githubusercontent.com/sul-dlss/spotlight/master/template.rb
$ rake rails:template LOCATION=https://raw.githubusercontent.com/sul-dlss/spotlight/master/template.rb
Or do it manually:
Add this line to your application's Gemfile:
And then execute:
$ rails g spotlight:install
Create an administrator
$ rake spotlight:initialize
Spotlight uses your application's Blacklight configuration to provide default values for an exhibit. The Blacklight configuration options are documented on the Blacklight wiki.
Default ActionMailer configuration
Spotlight introduces functionality that depends on being able to send emails to exhibit curators and contacts. Be sure to configure your application's environments appropriately (See the Rails Guide for Action Mailer Configuration ).
Spotlight needs the ability to write exhibit-specific content to your Solr index. The default indexing strategy uses Atomic Updates, introduced in Solr 4.x. Note the caveats, limitations and required configuration necessary to use this feature. The rake task
spotlight:check:solr will test if your Solr configuration is suitable for Atomic Updates.
If you are unable to use the Atomic Update strategy, your
SolrDocument class must implement a
#reindex method that can update the document in Solr with the exhibit-specific data provided by
To set up your development environment
Note: rake commands MAY need to be prefixed with
bundle exec, depending on your environment.
- Clone this repo,
cdin and run
$ bundle install
- Get and configure Jetty/Solr:
$ rake jetty:download
$ rake jetty:unzip
$ rake spotlight:configure_jetty
- Generate the internal test application (will be in
$ rake engine_cart:generate
- Start Jetty
$ rake jetty:start(may take a moment, use e.g.
$ fuser 8983/tcpor
$ ps aux | grep jettyto see when it's actually up)
- Index fixtures:
TEST_JETTY_PORT=8983 rake spotlight:fixtures
$ cd spec/internal
$ rake spotlight:initializeand answer prompts
- Start the dev server
- Visit http://localhost:3000 and sign in.