Skip to content

Commit 8d7b4cd

Browse files
committed
src/app/core: add citation_doi tag to head meta
This is used by harvesters like Altmetric and was present in DSpace version 6 and previous.
1 parent 885c52e commit 8d7b4cd

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/app/core/metadata/metadata.service.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ export class MetadataService {
161161
this.setCitationKeywordsTag();
162162

163163
this.setCitationAbstractUrlTag();
164+
this.setCitationDoiTag();
164165
this.setCitationPdfUrlTag();
165166
this.setCitationPublisherTag();
166167

@@ -294,6 +295,18 @@ export class MetadataService {
294295
}
295296
}
296297

298+
/**
299+
* Add <meta name="citation_doi" ... > to the <head>
300+
*/
301+
private setCitationDoiTag(): void {
302+
if (this.currentObject.value instanceof Item) {
303+
let doi = this.getMetaTagValue('dc.identifier.doi');
304+
if (hasValue(doi)) {
305+
this.addMetaTag('citation_doi', doi);
306+
}
307+
}
308+
}
309+
297310
/**
298311
* Add <meta name="citation_pdf_url" ... > to the <head>
299312
*/

0 commit comments

Comments
 (0)