This is an archive of the application that generated the old Open Access Books and Connected Youth websites. It is no longer in use but it contains archived development branches that we might want to refer to later. The Open Access Books website was replaced by Open Square. The Connected Youth website is being maintained with just home and about pages, with most of the content moved to Open Square.
This repo is superseded by opensquare-nyudlts, which builds the Open Square website as well as the new Connected Youth website.
For details, see:
Main repo for the building and testing of NYU Press websites:
This repo replaces the original, individual repos:
This is just a temporary, in-process repo for consolidating existing builders, to be used until we decide whether we want to migrate this to a generalized static site generation system.
git clone git@github.com:NYULibraries/dlts-nyu-press-epub-sites.git nyu-press-epub-sites
npm install
# Create local conf files for local builds. These local.json files are ignored
# by git.
cd source/connected-youth/json/conf/
cp dev.json local.json
# Edit local.json
cd ../../../open-access-books/json/conf/
cp dev.json local.json
# Edit local.json
Assuming:
- Built instances will be served from
http://localhost/[SITE]
- ReadiumJS viewer
cloud-reader
is being used and is accessed athttp://localhost/readium-js-viewer/dist/cloud-reader
. (Note: do not include "/cloud-reader" in thereadiumUrl
value) - Metadata is from the prod Solr index
source/connected-youth/json/conf/local.json:
{
"appName": "New York University Press",
"collectionCode": "connected-youth",
"appUrl": "http://localhost/connected-youth",
"appRoot": "",
"discovery": "http://discovery.dlib.nyu.edu:8080/solr3_discovery/nyupress",
"readiumUrl" : "http://localhost/readium-js-viewer/dist",
"EnableGoogleAnalytics": false,
"GoogleAnalyticsUA" : "[DISABLED]",
"GoogleAnalyticsDomain" : "[DISABLED]"
}
source/open-access-books/json/conf/local.json:
{
"appName": "New York University Press",
"collectionCode": "oa-books",
"appUrl": "http://localhost/open-access-books",
"appRoot": "",
"discovery": "http://discovery.dlib.nyu.edu:8080/solr3_discovery/nyupress",
"readiumUrl" : "http://localhost/readium-js-viewer/dist",
"EnableGoogleAnalytics": false,
"GoogleAnalyticsUA" : "[DISABLED]",
"GoogleAnalyticsDomain" : "[DISABLED]"
}
grunt connected-youth:local
grunt open-access-books:local
grunt connected-youth:dev
grunt connected-youth:stage
grunt connected-youth:prod
grunt open-access-books:dev
grunt open-access-books:stage
grunt open-access-books:prod
grunt connected-youth:test
grunt open-access-books:test
Note that test builds ignore the discovery
URL in test.json
, instead using
test/lib/solr-stub/
to dependency inject a request
function that returns
canned Solr responses based on request URL.
test/test.sh
...or...
Convenience wrapper for test/test.sh:
grunt test