A web application which provides the front-end user interface for the online discovery of bibliographic materials at the Rockefeller Archive Center.
- Python (Tested on 3.7.)
- Ruby 2.5.0 or higher
- Jekyll 4.1.1 or higher
- Node.js 12.18.3 or higher
Install git and clone the repository
$ git clone https://github.com/RockefellerArchiveCenter/library_discovery.git
Install Node.js dependencies listed in package.json
. From the project's root run
$ npm install
Build the site. From the project's root directory run
$ ./script/build
The build
script bundles four commands into a single bash script
script/make_pages.py
takes ArchivesSpacejson
files from_data/resources
and makes corresponding items pages.bundle exec jekyll build
builds the initial Jekyll_site
directory which can be servednode js/create-index.js
creates an initial search index based on the data currently in the site. Users will have to recreate the search index on every new build, as rebuilding will destroy the old search index.bundle exec htmlproofer ./_site
will only run automatically in TravisCI builds. Validates HTML output with htmlproofer.
Start the application locally from the project's root with
$ bundle exec jekyll serve --skip-initial-build
Once the application starts successfully, you should be able to access the application in your browser at http://localhost:4000
When you're done, shut down the application with ctrl+c
.
The repository includes BackstopJS to test visual changes to the site by comparing a set of reference images for different screen sizes. Anytime the CSS styles are changed, use BackstopJS to test locally:
- Build the site using the steps in the Local Development section and start the application using
bundle exec jekyll serve --skip-initial-build
- In another terminal, run the BackstopJS tests:
npm run backstop-test
. - Review the results in the browser and look at the diff of any failed tests.
- To update the reference image files with the results of the last test images use:
npm run backstop-approve
. Subsequent tests will be compared against these updated reference files. - Commit any updated reference images to the repository so that future tests will be compared against the most recent images.
To add or update reference images, edit the scenarios in backstop.json
and run npm run backstop-reference
.
On a periodic basis, it will be necessary to update the data contained in this site. Follow these steps to do that:
- Create a new branch based on
development
. - Move or copy the updated data (which is expected to be in a single JSON file) to the
data/marc
directory. - Run the
split_json.py
script in the root of this repository, passing in the filename of the updated data. This will create individual records for each item in the file, and will delete the original file after it has finished. - Submit a pull request against the development branch. Request the review of someone on the Digital Strategies team.
This code is released under an MIT License.