DigitalNZ / supplejack_website

This website demo is part of the standard Supplejack platform that can aggregate data and content from many different sources.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Supplejack Website

This website demo is part of the standard Supplejack platform that can aggregate data and content from many different sources.

It uses the supplejack_client gem to connect to the Supplejack API. For more information about Supplejack Client gem, please refer to the documentation.

⚠️ It is very important that you have setup an API instance with correct record schema before setting up this project (or any projects that interact with the API). The most important component of the API is record schema. Refer to API docs for instruction.

Installation

  • Start API server on port 3001: rails s -p 3001
  • Clone the demo website project: git clone git@github.com:DigitalNZ/supplejack_website
  • Copy the configuration file: cp config/application.example.yml config/application.yml
  • Customize its values, to generate api key, please refer to API Docs
  • Run bundle install
  • Run the server rails s

WARNING This demo website has been configured to work with sample record schema that comes with the supplejack api. It should work fine without any modification. If you want customization, please refer to the Configuration section to know how to do.

Configuration

To interact with the supplejack_api, you need to configure supplejack_client.rb file.

Open config/initializers/supplejack_client.rb

You must update these options for customization:

  • facets: List of available facets from the api that you want to be show in the website. They must be defined in record schema. Refer to API docs to understand how facet is defined.
  • fields: List of fields that you want to be requested to the API for every record. They must be defined in record schema. You can also include group in the list. Please refer to API docs to know how to define group.
  • search_attributes: List of fields to be sent to search object. These fields must be defined in record schema.
  • enable_debugging: Turn on full logging, default to true.
  • enable_caching: Enable caching long api request, default to false.

Other commented fields can be left with their default values.

Notes

You need to set up thumbnailer server for image processing(thumbnail_server_url setting in config/application.yml file). Check out Magickly on how to set up an image manipulation service.

For the purpose of demo, you can use the existing Magickly instance.

COPYRIGHT AND LICENSING

MAJORITY OF SUPPLEJACK CODE - GNU GENERAL PUBLIC LICENCE, VERSION 3

Supplejack is a tool for aggregating, searching and sharing metadata records. Supplejack Website is a component of Supplejack. Except as indicated below, the Supplejack Website code at https://github.com/DigitalNZ/supplejack_website is Crown copyright (C) 2014, New Zealand Government. Supplejack was created by DigitalNZ at the National Library of NZ and the Department of Internal Affairs. http://digitalnz.org/supplejack

Except as indicated below, this program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses / http://www.gnu.org/licenses/gpl-3.0.txt

MASONRY

The JavaScript grid layout library by David DeSandro (see http://masonry.desandro.com/#mit-license) is licensed under the MIT license (see http://desandro.mit-license.org)

INFINITE SCROLL

The jQuery plugin for infinite scrolling by Paul Irish (see https://github.com/paulirish/infinite-scroll) is licensed under the MIT license (see https://github.com/paulirish/infinite-scroll#license)

NORMALIZE.CSS

The customizable CSS file, that makes browsers render all elements more consistently, by Nicolas Gallagher and Jonathan Neal (see https://github.com/necolas/normalize.css) is licensed under terms at https://github.com/necolas/normalize.css/blob/master/LICENSE.md

About

This website demo is part of the standard Supplejack platform that can aggregate data and content from many different sources.


Languages

Language:Ruby 53.5%Language:SCSS 24.1%Language:Haml 10.5%Language:JavaScript 8.6%Language:HTML 3.2%