|
@@ -784,6 +784,8 @@ const organizeData = (data, lang) => {
|
|
|
doc.title = doc.name;
|
|
doc.title = doc.name;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ doc.tags = doc.tags.filter(str => !/[\u4e00-\u9fa5]/.test(str)); // 过滤掉tags中的中文
|
|
|
|
|
+
|
|
|
let utf8name = encodeURIComponent(uriTitle.replace(/[\s_]+/g, '-')).toLowerCase();
|
|
let utf8name = encodeURIComponent(uriTitle.replace(/[\s_]+/g, '-')).toLowerCase();
|
|
|
doc.uri = `/${lang}/coloring-page/${utf8name}-${doc._id}`;
|
|
doc.uri = `/${lang}/coloring-page/${utf8name}-${doc._id}`;
|
|
|
|
|
|
|
@@ -829,6 +831,8 @@ const organizeDetail = (doc, lang) => {
|
|
|
}
|
|
}
|
|
|
doc.publishTime = format(new Date(doc.publishTime), 'yyyy/MM/dd');
|
|
doc.publishTime = format(new Date(doc.publishTime), 'yyyy/MM/dd');
|
|
|
|
|
|
|
|
|
|
+ doc.tags = doc.tags.filter(str => !/[\u4e00-\u9fa5]/.test(str)); // 过滤掉tags中的中文
|
|
|
|
|
+
|
|
|
let utf8name = encodeURIComponent(uriTitle.replace(/[\s_]+/g, '-')).toLowerCase();
|
|
let utf8name = encodeURIComponent(uriTitle.replace(/[\s_]+/g, '-')).toLowerCase();
|
|
|
doc.uri = `/${lang}/coloring-page/${utf8name}-${doc._id}`;
|
|
doc.uri = `/${lang}/coloring-page/${utf8name}-${doc._id}`;
|
|
|
|
|
|