Skip to content

Commit 99840ba

Browse files
authored
Merge pull request #4034 from alanorth/7_x-citation-doi
Add citation_doi tag to head meta
2 parents 885c52e + 204556d commit 99840ba

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

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

Lines changed: 13 additions & 1 deletion
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

@@ -173,7 +174,6 @@ export class MetadataService {
173174
// this.setCitationIssueTag();
174175
// this.setCitationFirstPageTag();
175176
// this.setCitationLastPageTag();
176-
// this.setCitationDOITag();
177177
// this.setCitationPMIDTag();
178178

179179
// this.setCitationFullTextTag();
@@ -294,6 +294,18 @@ export class MetadataService {
294294
}
295295
}
296296

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

0 commit comments

Comments
 (0)