Fix yaml metadata description not able to show
This commit is contained in:
parent
db0ea715c6
commit
10a8448c6a
1 changed files with 3 additions and 3 deletions
|
@ -209,7 +209,7 @@ function showPublishNote(req, res, next) {
|
||||||
var origin = config.serverurl;
|
var origin = config.serverurl;
|
||||||
var data = {
|
var data = {
|
||||||
title: title,
|
title: title,
|
||||||
description: meta.description || markdown ? models.Note.generateDescription(markdown) : null,
|
description: meta.description || (markdown ? models.Note.generateDescription(markdown) : null),
|
||||||
viewcount: note.viewcount,
|
viewcount: note.viewcount,
|
||||||
createtime: createtime,
|
createtime: createtime,
|
||||||
updatetime: updatetime,
|
updatetime: updatetime,
|
||||||
|
@ -281,7 +281,7 @@ function actionInfo(req, res, note) {
|
||||||
var title = models.Note.decodeTitle(note.title);
|
var title = models.Note.decodeTitle(note.title);
|
||||||
var data = {
|
var data = {
|
||||||
title: meta.title || title,
|
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,
|
viewcount: note.viewcount,
|
||||||
createtime: createtime,
|
createtime: createtime,
|
||||||
updatetime: updatetime
|
updatetime: updatetime
|
||||||
|
@ -597,7 +597,7 @@ function showPublishSlide(req, res, next) {
|
||||||
var origin = config.serverurl;
|
var origin = config.serverurl;
|
||||||
var data = {
|
var data = {
|
||||||
title: title,
|
title: title,
|
||||||
description: meta.description || markdown ? models.Note.generateDescription(markdown) : null,
|
description: meta.description || (markdown ? models.Note.generateDescription(markdown) : null),
|
||||||
viewcount: note.viewcount,
|
viewcount: note.viewcount,
|
||||||
createtime: createtime,
|
createtime: createtime,
|
||||||
updatetime: updatetime,
|
updatetime: updatetime,
|
||||||
|
|
Loading…
Reference in a new issue