Upgrading Universal Viewer - UVicLibrary/Vault GitHub Wiki
As of April 2020, we are using Hyrax version 2.3.3, which uses the PulUvRails gem by Princeton University Libraries. The latter is deprecated and has been removed from Hyrax 3. We want to upgrade our Universal Viewer to be like the one in Hyrax 3. For some reason, rake hyrax:universal_viewer:install
didn't work for us.)
The following steps to finish the upgrade are based on this issue and this rake task:
-
Clone this minimal UV example
git clone https://github.com/UniversalViewer/uv-hello-world.git
-
Install and copy it to Hyku app.
cd uv-hello-world npm i cp uv-hello-world/uv [path to hyku or hyrax]/node_modules/universalviewer/ -r cd [path to hyku or hyrax] yarn install
Or, you can install the node modules elsewhere (e.g. in
/usr/local
) and then move the installed module into thepublic
folder.cd /usr/local git clone https://github.com/UniversalViewer/uv-hello-world.git cd uv-hello-world npm i cp uv.zip [path to hyku or hyrax]/public # or mv uv.zip [path to hyku or hyrax]/public cd [path to hyku or hyrax]/public unzip uv.zip
-
Hyrax still needs a few extra files or else you will get an error message.
-
We need to create/modify some files in order to swap out the old viewer for the new one.
-
Your UV iframe will draw on the following URL (replace stuff in square brackets to fit your install):
[tenant base url]/uv/uv.html#?[manifest link]&config=[tenant base url]/uv/uv-config.json
tenant base url
is the domain name for your tenant (e.g. test.library.uvic.ca)manifest link
is the link to the work id + manifest.json (/concerns/generic_works/[work id goes here]/manifest.json
)