Open CrazyGriferman opened 3 years ago
TypeError: /Users/zhaoqi/blog/themes/hueman/layout/page.ejs:1
1| <%- partial('common/article', { post: page }) %>
/Users/zhaoqi/blog/themes/hueman/layout/common/article.ejs:28 26| 27|
28| <%- partial('post/ld_json', { post: post }) %> 29| 30| <%- partial('comment/index') %> 31|
/Users/zhaoqi/blog/themes/hueman/layout/common/post/ld_json.ejs:12 10| "image": "<%- url_for(config.url + thumbnail(post)) %>", 11| <% if (post.tags) { %>"keywords": "<%- post.tags.map(t => t.name).join(' ') %>",<% } %>
12| <% if (post.categories) { %>"genre": "<%- post.categories.map(c => c.name).join(' ') %>",<% } %> 13| "datePublished": "<%- date(post.date, 'YYYY-MM-DD') %>", 14| "dateCreated": "<%- date(post.date, 'YYYY-MM-DD') %>", 15| <% if (post.updated) { %>"dateModified": "<%- date(post.updated, 'YYYY-MM-DD') %>",<% } %>
post.categories.map is not a function
at eval (eval at compile (/Users/zhaoqi/blog/node_modules/ejs/lib/ejs.js:618:12),
@CrazyGriferman What's the front-matter of your post markdown file?
ERROR /Users/zhaoqi/blog/themes/hueman/layout/page.ejs:1
/Users/zhaoqi/blog/themes/hueman/layout/common/article.ejs:28 26| 27|
/Users/zhaoqi/blog/themes/hueman/layout/common/post/ld_json.ejs:12 10| "image": "<%- url_for(config.url + thumbnail(post)) %>", 11| <% if (post.tags) { %>"keywords": "<%- post.tags.map(t => t.name).join(' ') %>",<% } %>
post.categories.map is not a function
Did anyone meet this problem? It doesn't affect the site but it's annoying.