volantis-x / community

Volantis Community 社区主页 https://volantis.js.org
https://volantis.js.org
MIT License
105 stars 110 forks source link

有没有人注意到 volantis.js.org 中出现两次的 friends.yml 示例不一样吗 #170

Closed God-2077 closed 3 weeks ago

God-2077 commented 3 weeks ago

有没有人注意到 volantis.js.org 中出现两次的 friends.yml 示例不一样吗?

4. 页面配置

- group: # 分组标题
  description:  # 分组描述
  items:
    - title: # 名称
      avatar: # 头像
      url: # 链接
      screenshot: # 截图
      keywords: # 关键词
      description: # 描述
    - title: # 名称
      avatar: # 头像
      url: # 链接
      screenshot: # 截图
      keywords: # 关键词
      description: # 描述

5. 标签插件

volantis_developer:
  title:
  description:
  items:
    - title: xaoxuu
      url: https://github.com/xaoxuu
      avatar: https://avatars.githubusercontent.com/u/16400144?s=60&v=4
    - title: MHuiG
      url: https://github.com/MHuiG
      avatar: https://avatars.githubusercontent.com/u/38281581?s=60&v=4

这两种配置方式在 layout: friends 友链页面都能正常显示,但使用页面配置的,没法用 {% friends only:friendlinks %} 来按组筛选。

能不能来说明一下?

Colsrch commented 3 weeks ago
  1. 页面配置中的示例仅可在 layout: friends 页面中显示
  2. 标签插件中的配置支持在任意位置使用 {% friends %} 展示,下面这个配置可以使用 {% friends only:volantis_developer %} 引用它

    数据按组筛选

    volantis_developer:
    title:
    description:
    items:
    - title: xaoxuu
    url: https://github.com/xaoxuu
    avatar: https://avatars.githubusercontent.com/u/16400144?s=60&v=4
    - title: MHuiG
    url: https://github.com/MHuiG
    avatar: https://avatars.githubusercontent.com/u/38281581?s=60&v=4
God-2077 commented 3 weeks ago

我把上面这个配置放进friends.yml 就莫名奇妙报错了

INFO  Validating config
INFO  
============================================================
  Volantis 6.0.0-alpha.0
  Docs: https://volantis.js.org/
  Repo: https://github.com/volantis-x/hexo-theme-volantis/
============================================================
INFO  Start processing
INFO  Checking environment configuration...
INFO  Generating urls for last 5 posts
INFO  Posts urls generated in submit_urls.txt
https://xxxx.xxx/2024/08/16/sssssssss/
https://xxxx.xxx/2024/08/16/posts-shi-yong-decap-cms-zuo-wei-hexo-hou-duan-yi-shi-xian-zai-xian-bian-ji-bao-mu-ji-jiao-cheng/
https://xxxx.xxx/2024/08/11/sui-sui-nian-2024-08-11/
https://xxxx.xxx/2024/08/11/posts-artplayer-bo-fang-qi-de-jian-dan-shi-yong/
https://xxxx.xxx/2024/06/08/sui-sui-nian-2024-nian-de-gao-san-han-lou/
INFO  Hexo is running at http://localhost:4000/ . Press Ctrl+C to stop.
Unhandled rejection TypeError: C:\Users\y\yufile\server\hexo\10\hexo-build\themes\volantis\layout\friends.ejs:7
    5|     <%- page.excerpt %>
    6|     <% if (site.data.friends){ %>
 >> 7|       <% getList(site.data.friends).forEach((group, i) => { %>
    8|         <div class='friends-group'>
    9|           <br>

list is not iterable
    at Object.<anonymous> (C:\Users\y\yufile\server\hexo\10\hexo-build\themes\volantis\scripts\helpers\getList.js:9:16)
    at eval ("C:\\Users\\y\\yufile\\server\\hexo\\10\\hexo-build\\themes\\volantis\\layout\\friends.ejs":32:8)
    at friends (C:\Users\y\yufile\server\hexo\10\hexo-build\node_modules\ejs\lib\ejs.js:703:17)
    at _View._compiled (C:\Users\y\yufile\server\hexo\10\hexo-build\node_modules\hexo\dist\theme\view.js:123:67)
    at _View.render (C:\Users\y\yufile\server\hexo\10\hexo-build\node_modules\hexo\dist\theme\view.js:48:21)
    at C:\Users\y\yufile\server\hexo\10\hexo-build\node_modules\hexo\dist\hexo\index.js:60:29
    at tryCatcher (C:\Users\y\yufile\server\hexo\10\hexo-build\node_modules\bluebird\js\release\util.js:16:23)
    at C:\Users\y\yufile\server\hexo\10\hexo-build\node_modules\bluebird\js\release\method.js:15:34
    at RouteStream._read (C:\Users\y\yufile\server\hexo\10\hexo-build\node_modules\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)

INFO  Check environment configuration success!
Unhandled rejection TypeError: C:\Users\y\yufile\server\hexo\10\hexo-build\themes\volantis\layout\friends.ejs:7
    5|     <%- page.excerpt %>
    6|     <% if (site.data.friends){ %>
 >> 7|       <% getList(site.data.friends).forEach((group, i) => { %>
    8|         <div class='friends-group'>
    9|           <br>
    10|           <h2 class='friend-header'>

list is not iterable
    at Object.<anonymous> (C:\Users\y\yufile\server\hexo\10\hexo-build\themes\volantis\scripts\helpers\getList.js:9:16)
    at eval ("C:\\Users\\y\\yufile\\server\\hexo\\10\\hexo-build\\themes\\volantis\\layout\\friends.ejs":32:8)
    at friends (C:\Users\y\yufile\server\hexo\10\hexo-build\node_modules\ejs\lib\ejs.js:703:17)
    at _View._compiled (C:\Users\y\yufile\server\hexo\10\hexo-build\node_modules\hexo\dist\theme\view.js:123:67)
    at _View.render (C:\Users\y\yufile\server\hexo\10\hexo-build\node_modules\hexo\dist\theme\view.js:48:21)
    at C:\Users\y\yufile\server\hexo\10\hexo-build\node_modules\hexo\dist\hexo\index.js:60:29
    at tryCatcher (C:\Users\y\yufile\server\hexo\10\hexo-build\node_modules\bluebird\js\release\util.js:16:23)
    at C:\Users\y\yufile\server\hexo\10\hexo-build\node_modules\bluebird\js\release\method.js:15:34
    at RouteStream._read (C:\Users\y\yufile\server\hexo\10\hexo-build\node_modules\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 TypeError: C:\Users\y\yufile\server\hexo\10\hexo-build\themes\volantis\layout\friends.ejs:7
    5|     <%- page.excerpt %>
    6|     <% if (site.data.friends){ %>
 >> 7|       <% getList(site.data.friends).forEach((group, i) => { %>
    8|         <div class='friends-group'>
    9|           <br>
    10|           <h2 class='friend-header'>

list is not iterable
    at Object.<anonymous> (C:\Users\y\yufile\server\hexo\10\hexo-build\themes\volantis\scripts\helpers\getList.js:9:16)
    at eval ("C:\\Users\\y\\yufile\\server\\hexo\\10\\hexo-build\\themes\\volantis\\layout\\friends.ejs":32:8)
    at friends (C:\Users\y\yufile\server\hexo\10\hexo-build\node_modules\ejs\lib\ejs.js:703:17)
    at _View._compiled (C:\Users\y\yufile\server\hexo\10\hexo-build\node_modules\hexo\dist\theme\view.js:123:67)
    at _View.render (C:\Users\y\yufile\server\hexo\10\hexo-build\node_modules\hexo\dist\theme\view.js:48:21)
    at C:\Users\y\yufile\server\hexo\10\hexo-build\node_modules\hexo\dist\hexo\index.js:60:29
    at tryCatcher (C:\Users\y\yufile\server\hexo\10\hexo-build\node_modules\bluebird\js\release\util.js:16:23)
    at C:\Users\y\yufile\server\hexo\10\hexo-build\node_modules\bluebird\js\release\method.js:15:34
    at RouteStream._read (C:\Users\y\yufile\server\hexo\10\hexo-build\node_modules\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)

(我这个issues是不是改放到volantis)

God-2077 commented 3 weeks ago

好像明白了,把友链页面删了就好