Skip to content

Commit 987e146

Browse files
authored
Merge pull request #4035 from alanorth/citation-doi-tag
[Port main] Add citation_doi tag to head meta
2 parents 9db25ec + f28dc8b commit 987e146

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

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

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

@@ -198,7 +199,6 @@ export class HeadTagService {
198199
// this.setCitationIssueTag();
199200
// this.setCitationFirstPageTag();
200201
// this.setCitationLastPageTag();
201-
// this.setCitationDOITag();
202202
// this.setCitationPMIDTag();
203203

204204
// this.setCitationFullTextTag();
@@ -319,6 +319,18 @@ export class HeadTagService {
319319
}
320320
}
321321

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

0 commit comments

Comments
 (0)