Fix document output to better work with reality
This commit is contained in:
parent
59826930e4
commit
985a14629a
|
@ -43,12 +43,12 @@ function documentFile(metadata) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let desc = `${metadata.author||'Unknown Author'} - ${metadata.title||'Unknown'}`;
|
let result = metadata.author || '';
|
||||||
const created = moment(metadata.createdate);
|
if(result) {
|
||||||
if(created.isValid()) {
|
result += ' - ';
|
||||||
desc += ` (${created.format('YYYY')})`;
|
|
||||||
}
|
}
|
||||||
return desc;
|
result += metadata.title || 'Unknown Title';
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
function imageFile(metadata) {
|
function imageFile(metadata) {
|
||||||
|
|
Loading…
Reference in New Issue