Commit 6cefc3bb authored by Maxime Chaillet's avatar Maxime Chaillet

Merge branch 'issue78' into 'master'

It fixes #78.

Closes #78

See merge request !98
parents cda68cff eb5cdb51
Pipeline #15211 passed with stages
in 41 seconds
This diff is collapsed.
......@@ -28,7 +28,11 @@ GoogleMetadataObject.prototype.setLicense = function () {
GoogleMetadataObject.prototype.setDescription = function () {
if (this.data.name) {
if (!this.data.description) {
this.data.description = this.data.name;
if (this.data.author && this.data.author instanceof Array) {
var authors = this.data.author.map(function (author) { return author.name; }).join();
var trailingMessage = 'There is currently no additional information regarding the description of this DOI.';
this.data.description = this.data.name + '; ' + authors + '; ' + trailingMessage;
}
}
} else {
console.log("[GoogleMetadataObject] - The data required by Google is missing the 'name' field. This is required by Google for indexing.");
......
......@@ -132,7 +132,7 @@ module.exports = {
"@type": "Organization",
"name": "DataCite"
},
"description": "Nanoscopic Metal Composition of Phagosomal Compartments during Engulfment of E. coli by Professional Phagocytes.",
"description": "Nanoscopic Metal Composition of Phagosomal Compartments during Engulfment of E. coli by Professional Phagocytes.; Björn DE SAMBER,Constantin URBAN,Bart VEKEMANS,Gerald FALKENBERG,Ella DE PAUW; There is currently no additional information regarding the description of this DOI.",
}
}
]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment