MaLuns / hexo-theme-async

一个简单而轻量级的 Hexo 主题。 | A simple, lightweight Hexo theme.
https://hexo-theme-async.imalun.com
MIT License
325 stars 40 forks source link

[Feature]: 能否适配?waline #124

Closed shulng closed 2 months ago

shulng commented 2 months ago

想要的功能 | What feature do you want?

No response

MaLuns commented 2 months ago

简单做了个添加 waline 的 demo, 你可以参考下 https://stackblitz.com/edit/node-y18sm7

MaLuns commented 2 months ago

评论插件太多了,也五花八门使用方式,主要没精力每个都加进去, 可以用主题的 自定义模板 方式去做这个

shulng commented 2 months ago

简单做了个添加 waline 的 demo, 你可以参考下 https://stackblitz.com/edit/node-y18sm7

PS G:\Hexo> hexo cl; hexo s
INFO Validating config INFO Hexo-Theme-Async version 2.2.2. Guide: https://hexo-theme-async.imalun.com INFO Deleted database. INFO Validating config INFO Hexo-Theme-Async version 2.2.2. Guide: https://hexo-theme-async.imalun.com INFO Start processing INFO Hexo is running at http://localhost:4000/ . Press Ctrl+C to stop. Unhandled rejection Error: G:\Hexo\node_modules\hexo-theme-async\layout\post.ejs:17 15| } 16| %>

17| <%- partial(theme.layout.main, { 18| banner: partial(theme.layout.banner, banner), 19| content: partial(theme.layout.page_post) 20| }) %>

G:\Hexo\node_modules\hexo-theme-async\layout_partial\page\post.ejs:9 7| <%- partial(theme.layout.post_next_prev) %> 8| <% if(page.comments) { %>

9| <%- partial(theme.layout.comment) %> 10| <% } %>

Partial async/comment does not exist. (in _partial\page\post.ejs) at Object.partial (G:\Hexo\node_modules\hexo\dist\plugins\helper\partial.js:13:15) at eval ("G:\Hexo\node_modules\hexo-theme-async\layout\_partial\page\post.ejs":28:17) at post (G:\Hexo\node_modules\ejs\lib\ejs.js:703:17) at _View._compiledSync (G:\Hexo\node_modules\hexo\dist\theme\view.js:117:32) at _View.renderSync (G:\Hexo\node_modules\hexo\dist\theme\view.js:55:29) at Object.partial (G:\Hexo\node_modules\hexo\dist\plugins\helper\partial.js:27:17) at eval ("G:\Hexo\node_modules\hexo-theme-async\layout\post.ejs":31:14) at post (G:\Hexo\node_modules\ejs\lib\ejs.js:703:17) at _View._compiled (G:\Hexo\node_modules\hexo\dist\theme\view.js:120:67) at _View.render (G:\Hexo\node_modules\hexo\dist\theme\view.js:37:21) at G:\Hexo\node_modules\hexo\dist\hexo\index.js:60:29 at tryCatcher (G:\Hexo\node_modules\bluebird\js\release\util.js:16:23) at G:\Hexo\node_modules\bluebird\js\release\method.js:15:34 at RouteStream._read (G:\Hexo\nodemodules\hexo\dist\hexo\router.js:43:9) at Readable.read (node:internal/streams/readable:737:12) at resume (node:internal/streams/readable:1255:12) at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

Unhandled rejection Error: G:\Hexo\node_modules\hexo-theme-async\layout\post.ejs:17 15| } 16| %>

17| <%- partial(theme.layout.main, { 18| banner: partial(theme.layout.banner, banner), 19| content: partial(theme.layout.page_post) 20| }) %>

G:\Hexo\node_modules\hexo-theme-async\layout_partial\page\post.ejs:9 7| <%- partial(theme.layout.post_next_prev) %> 8| <% if(page.comments) { %>

9| <%- partial(theme.layout.comment) %> 10| <% } %>

Partial async/comment does not exist. (in _partial\page\post.ejs) at Object.partial (G:\Hexo\node_modules\hexo\dist\plugins\helper\partial.js:13:15) at eval ("G:\Hexo\node_modules\hexo-theme-async\layout\_partial\page\post.ejs":28:17) at post (G:\Hexo\node_modules\ejs\lib\ejs.js:703:17) at _View._compiledSync (G:\Hexo\node_modules\hexo\dist\theme\view.js:117:32) at _View.renderSync (G:\Hexo\node_modules\hexo\dist\theme\view.js:55:29) at Object.partial (G:\Hexo\node_modules\hexo\dist\plugins\helper\partial.js:27:17) at eval ("G:\Hexo\node_modules\hexo-theme-async\layout\post.ejs":31:14) at post (G:\Hexo\node_modules\ejs\lib\ejs.js:703:17) at _View._compiled (G:\Hexo\node_modules\hexo\dist\theme\view.js:120:67) at _View.render (G:\Hexo\node_modules\hexo\dist\theme\view.js:37:21) at G:\Hexo\node_modules\hexo\dist\hexo\index.js:60:29 at tryCatcher (G:\Hexo\node_modules\bluebird\js\release\util.js:16:23) at G:\Hexo\node_modules\bluebird\js\release\method.js:15:34 at RouteStream._read (G:\Hexo\nodemodules\hexo\dist\hexo\router.js:43:9) at Readable.read (node:internal/streams/readable:737:12) at resume (node:internal/streams/readable:1255:12) at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

试了一下,貌似会报错,网页打不开

MaLuns commented 2 months ago

Partial async/comment does not exist. 提示配置模板没找到,检查下你配置和文件路径对不对

shulng commented 2 months ago

Partial async/comment does not exist. 提示配置模板没找到,检查下你配置和文件路径对不对

我是照的,你这个填的没发现什么问题但就是会报错

shulng commented 2 months ago

Partial async/comment does not exist. 提示配置模板没找到,检查下你配置和文件路径对不对

我是照的,你这个填的没发现什么问题但就是会报错

QQ截图20240705005537 QQ截图20240705005528 QQ截图20240705005514

MaLuns commented 2 months ago

文件夹名是 layout

shulng commented 2 months ago

文件夹名是 layout

解决了,原来是我眼瞎了😂

shulng commented 2 months ago

文件夹名是 layout

麻烦您了