Closed maruwtc closed 2 years ago
7:57:29 PM: $ npm run build 7:57:29 PM: > hexo-site@0.0.0 build 7:57:29 PM: > hexo generate 7:57:30 PM: INFO Validating config 7:57:30 PM: INFO Start processing 7:57:30 PM: INFO Files loaded in 406 ms 7:57:30 PM: ERROR TypeError: /opt/build/repo/themes/argon/layout/post.ejs:2 7:57:30 PM: 1| <% if (is_post()) { %> 7:57:30 PM: >> 2| <%- partial('_partial/content-article', {post: page}) %> 7:57:30 PM: 3| <%- partial('_partial/article-bottom', {post: page}) %> 7:57:30 PM: 4| <% } %> 7:57:30 PM: 5| <% if (is_page()) { %> 7:57:30 PM: /opt/build/repo/themes/argon/layout/_partial/content-article.ejs:20 7:57:30 PM: 18| <%= post.title %> 7:57:30 PM: 19|
hexo现在已经不再内置 ejs 渲染器了
ejs
在hexp目录下运行以下命令安装以解决你的问题
npm install hexo-renderer-ejs
7:57:29 PM: $ npm run build 7:57:29 PM: > hexo-site@0.0.0 build 7:57:29 PM: > hexo generate 7:57:30 PM: INFO Validating config 7:57:30 PM: INFO Start processing 7:57:30 PM: INFO Files loaded in 406 ms 7:57:30 PM: ERROR TypeError: /opt/build/repo/themes/argon/layout/post.ejs:2 7:57:30 PM: 1| <% if (is_post()) { %> 7:57:30 PM: >> 2| <%- partial('_partial/content-article', {post: page}) %> 7:57:30 PM: 3| <%- partial('_partial/article-bottom', {post: page}) %> 7:57:30 PM: 4| <% } %> 7:57:30 PM: 5| <% if (is_page()) { %> 7:57:30 PM: /opt/build/repo/themes/argon/layout/_partial/content-article.ejs:20 7:57:30 PM: 18| <%= post.title %> 7:57:30 PM: 19|
hexo现在已经不再内置
ejs
渲染器了在hexp目录下运行以下命令安装以解决你的问题