The main motivation behind this PR is to properly display references that do not include a link to the thing being reference--e.g. a paper that is still "in press". Previously, if a NERDm reference did not include a location property (which provides the URL to the cited thing), the landing was still rendering it as a link, which by default went to the PDR home URL. With this PR, it is now rendered as regular text. Supporting this feature required an update to the NERDm core schema (see oar-metadata PR#50).
I took this opportunity to fix a few other reference rendering issues:
When listing multiple references, the commas were being prepended with a space; sometimes this would cause the comma to appear on a line by itself.
references were being forced into a line-height of 1.0, which is a bit too tight; with this PR, this set to a more pleasant 1.2 with a little extra space between reference.
To test these changes, I've set up a special oar-docker branch, test/inpress-refs. After running localdeploy and oarctl local build, run the following script to load three test records:
data/load_nerdm.sh data/pdr/nerdm/*.json
(There is no need to start from scratch.)
Next view the following landing pages and confirm proper rendering as described below:
mds2-2304: This page will display one reference in the references section as a link to the remote article, but none at the top of the page (above the version info).
mds1141dw08w: This page will show three references in the References section, but only one of them will appear at the top of the page under a label of "Described in this article". The text for the top reference will be the article title. All references will appear as links.
mds2-2176: The References section will show 6 references; all are links except for the third one. The unlinked reference will not feature the external link icon. Three references will appear at the top of the page with the following features:
the last reference will not be a link and will not include the external link icon
there is no space before the comma at the end of the first and second reference
The main motivation behind this PR is to properly display references that do not include a link to the thing being reference--e.g. a paper that is still "in press". Previously, if a NERDm reference did not include a
location
property (which provides the URL to the cited thing), the landing was still rendering it as a link, which by default went to the PDR home URL. With this PR, it is now rendered as regular text. Supporting this feature required an update to the NERDm core schema (see oar-metadata PR#50).I took this opportunity to fix a few other reference rendering issues:
To test these changes, I've set up a special oar-docker branch, test/inpress-refs. After running
localdeploy
andoarctl local build
, run the following script to load three test records:(There is no need to start from scratch.)
Next view the following landing pages and confirm proper rendering as described below: