A Jekyll static site generator for archival description serialized in JSON, generated via the ArchivesSpace REST API.
You can see a live version of this site with sample data here.
-
Python (tested on v2.7)
-
Python Modules:
-
Jekyll (to build the site)
-
Grunt (for running build and deployment tasks)
-
An ArchivesSpace instance with some data entered.
- Clone this repository
git clone [email protected]:helrond/staticAid.git
or download the ZIP file. - Install dependencies. See "Requirements" above for a list of things you'll need to have installed.
- In this project's root directory, run
npm install
to install dependencies for Grunt. - Run
utilities/setup.py
to create a configuration file which will allow you to fetch and update data from ArchivesSpace. - Change the values in
_config.yml
to match your preferences. Make sure to changeurl
andbaseurl
.
You have three options for building the HTML site using Jekyll. In all cases, Jekyll will place the generate site in a directory called _site
.
Running grunt build
will build the site based on the data currently in the _data
directory.
Running grunt update
will fetch JSON for resource records, resource record trees and archival objects from ArchivesSpace using utilities/getJson.py
and save it in your _data
directory, then will build the site based on that data.
WARNING: Depending on the size of your ArchivesSpace installation, it could take quite a while for this script to loop through all resource records and components. Be patient!
By default, grunt update
will only fetch JSON updated since the last time utilities/getJson.py
completed successfully. At any point, you can run grunt rebuild
to wipe out the existing data and build the site from scratch.
WARNING: Depending on the size of your ArchivesSpace installation, it could take quite a while for this script to loop through all resource records and components. Be patient!
To start a local server (useful for previewing the site), run grunt serve
. You can then access the site by opening a browser and pointing it to http://localhost:4000
. To stop the server, use ctrl + c
.
This server will use the HTML generated by the last build, so if you've made changes to any of your templates or data you'll need to build the site in order to see those changes (see above).
Github Pages support Jekyll sites, so a quick way to make your description publicly accessible is to push to a gh-pages
branch in a Github repository. See the Github Pages documentation for more information.
Pull requests accepted! Feel free to file issues on this repository as well.
Hillel Arnold
staticAid is released under the MIT License. See LICENSE.md
for more information.