mirror of https://github.com/status-im/codimd.git
Fix yaml metadata description not able to show
This commit is contained in:
parent
db0ea715c6
commit
10a8448c6a
|
@ -209,7 +209,7 @@ function showPublishNote(req, res, next) {
|
|||
var origin = config.serverurl;
|
||||
var data = {
|
||||
title: title,
|
||||
description: meta.description || markdown ? models.Note.generateDescription(markdown) : null,
|
||||
description: meta.description || (markdown ? models.Note.generateDescription(markdown) : null),
|
||||
viewcount: note.viewcount,
|
||||
createtime: createtime,
|
||||
updatetime: updatetime,
|
||||
|
@ -281,7 +281,7 @@ function actionInfo(req, res, note) {
|
|||
var title = models.Note.decodeTitle(note.title);
|
||||
var data = {
|
||||
title: meta.title || title,
|
||||
description: meta.description || markdown ? models.Note.generateDescription(markdown) : null,
|
||||
description: meta.description || (markdown ? models.Note.generateDescription(markdown) : null),
|
||||
viewcount: note.viewcount,
|
||||
createtime: createtime,
|
||||
updatetime: updatetime
|
||||
|
@ -597,7 +597,7 @@ function showPublishSlide(req, res, next) {
|
|||
var origin = config.serverurl;
|
||||
var data = {
|
||||
title: title,
|
||||
description: meta.description || markdown ? models.Note.generateDescription(markdown) : null,
|
||||
description: meta.description || (markdown ? models.Note.generateDescription(markdown) : null),
|
||||
viewcount: note.viewcount,
|
||||
createtime: createtime,
|
||||
updatetime: updatetime,
|
||||
|
|
Loading…
Reference in New Issue