Skip to content

Commit 0251aaa

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 b480317 commit 0251aaa

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

src/app/core/metadata/head-tag.service.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ export class HeadTagService {
186186
this.setCitationKeywordsTag();
187187

188188
this.setCitationAbstractUrlTag();
189+
this.setCitationDoiTag();
189190
this.setCitationPdfUrlTag();
190191
this.setCitationPublisherTag();
191192

@@ -319,6 +320,18 @@ export class HeadTagService {
319320
}
320321
}
321322

323+
/**
324+
* Add <meta name="citation_doi" ... > to the <head>
325+
*/
326+
protected setCitationDoiTag(): void {
327+
if (this.currentObject.value instanceof Item) {
328+
const doi = this.getMetaTagValue('dc.identifier.doi');
329+
if (hasValue(doi)) {
330+
this.addMetaTag('citation_doi', doi);
331+
}
332+
}
333+
}
334+
322335
/**
323336
* Add <meta name="citation_pdf_url" ... > to the <head>
324337
*/

0 commit comments

Comments
 (0)