Hexo建站提示TypeError

这是错误报告

ASUS@ASUSVivoBookS15 MINGW64 /e/博客/Hexo/blog
$ hexo g
INFO  Validating config
INFO  Start processing
INFO  Files loaded in 171 ms
ERROR
TypeError: E:\博客\Hexo\blog\themes\siberia\layout\post.ejs:1
 >> 1| <%- partial('partial/article', {post: page, index: false}) %>

E:\博客\Hexo\blog\themes\siberia\layout\partial\article.ejs:41
    39|             <%= __('tags') %>:
    40|             <% if (post.tags && post.tags.length){ %>
 >> 41|                 <%- list_tags(post.tags, {
    42|                     show_count: false,
    43|                     class: 'def-font article-tag',
    44|                 }) %>

tags.toArray is not a function
    at transformArgs (E:\博客\Hexo\blog\node_modules\hexo\lib\plugins\helper\list_tags.js:103:18)
    at moized(bound listTagsHelper) (E:\博客\Hexo\blog\node_modules\micro-memoize\dist\micro-memoize.cjs.js:333:19)
    at Object.listTagsHelperFactory (E:\博客\Hexo\blog\node_modules\hexo\lib\plugins\helper\list_tags.js:110:6)
    at eval ("E:\\博客\\Hexo\\blog\\themes\\siberia\\layout\\partial\\article.ejs":88:17)
    at article (E:\博客\Hexo\blog\node_modules\ejs\lib\ejs.js:703:17)
    at _View._compiledSync (E:\博客\Hexo\blog\node_modules\hexo\lib\theme\view.js:132:24)
    at _View.renderSync (E:\博客\Hexo\blog\node_modules\hexo\lib\theme\view.js:59:25)
    at Object.partial (E:\博客\Hexo\blog\node_modules\hexo\lib\plugins\helper\partial.js:34:15)
    at eval ("E:\\博客\\Hexo\\blog\\themes\\siberia\\layout\\post.ejs":10:17)
    at post (E:\博客\Hexo\blog\node_modules\ejs\lib\ejs.js:703:17)
    at _View._compiled (E:\博客\Hexo\blog\node_modules\hexo\lib\theme\view.js:136:50)
    at _View.render (E:\博客\Hexo\blog\node_modules\hexo\lib\theme\view.js:39:17)
    at E:\博客\Hexo\blog\node_modules\hexo\lib\hexo\index.js:64:21
    at tryCatcher (E:\博客\Hexo\blog\node_modules\bluebird\js\release\util.js:16:23)
    at E:\博客\Hexo\blog\node_modules\bluebird\js\release\method.js:15:34
    at RouteStream._read (E:\博客\Hexo\blog\node_modules\hexo\lib\hexo\router.js:47:5)
    at Readable.read (node:internal/streams/readable:496:12)
    at resume_ (node:internal/streams/readable:999:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
INFO  Generated: about/index.html
INFO  Generated: atom.xml
INFO  Generated: sitemap.txt
INFO  Generated: sitemap.xml
INFO  Generated: archives/index.html
INFO  Generated: categories/index.html
INFO  Generated: tags/index.html
INFO  Generated: index.html
INFO  Generated: js/effect.js
INFO  Generated: archives/2023/08/index.html
INFO  Generated: css/style.css
INFO  Generated: archives/2023/index.html
INFO  Generated: 2023/08/24/hello-world/index.html
INFO  Generated: avator.jpg
INFO  Generated: background/blur-cars-dew-125510.jpg
INFO  15 files generated in 47 ms

这是错误文件

<%- partial('partial/article', {post: page, index: false}) %>

这是另一个错误文件

<article id="<%= post.layout %>-<%= post.slug %>" class="article" itemscope itemprop="blogPost">
    <div id="" class="index-article-content">
        <% if(post.fbg){ %>
        <% } %>

        <% if(post.ftag){ %>
            <div class="feature-tag def-font">
                <a href="#"><%= theme.ftags[post.ftag] %></a>
            </div>
        <% } %>

        <% if (post.link || post.title){ %>
            <div class="index-post-title">
                <% if (post.link){ %>
                    <h1 itemprop="name">
                        <a href="<%- url_for(post.link) %>" target="_blank" itemprop="url"><%= post.title %></a>
                    </h1>
                <% } else if (post.title){ %>
                    <% if (index){ %>
                        <h1 itemprop="name">
                            <a href="<%- url_for(post.path) %>"><%= post.title %></a>
                        </h1>
                    <% } else { %>
                        <h1 itemprop="name">
                            <%= post.title %>
                        </h1>
                    <% } %>
                <% } %>
            </header>
        <% } %>

        <div class="author-info">
            <p>
                <% var date = new Date(page.date); %>
                <% if(post.author){ %><%= __('author') %>: <%= post.author %>, <%= __('date') %>: <% } %><%= date.getFullYear() + "/" + date.getMonth() + "/" + date.getDate() %>
            </p>
        </div>
        <div class="content-tag-list">
            <%= __('tags') %>:
            <% if (post.tags && post.tags.length){ %>
                <%- list_tags(post.tags, {
                    show_count: false,
                    class: 'def-font article-tag', 
                }) %>
            <% } %>
        </div>

        <hr class="content-split-line content-split-range" />

        <% if(post.fbg){ %>
            <div class="content-feature-image">
            <img class="" src="<%= post.fbg %>" alt="">
            <% if(post.fbgdesc){ %>
                <p class="img-desc def-font" style="margin-top: 0px;"><%- post.fbgdesc %></p>
            <% } %>
            </div>
        <% } %>

        <div class="article-entry">
            <%- post.content %>
        </div>

        <% if (!index && post.comments && config.disqus_shortname){ %>
        <hr class="content-split-line" />
        <div id="content-disqus">
            <section id="comments">
            <div id="disqus_thread">
                <noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
            </div>
            </section>
        <% } %>
        </div>

        <hr class="content-split-line" />
  </div>
</article>



<footer>
    <div id="content-nav">
        <!-- Next Post and Prev Post -->
        <% if (page.prev || page.next){ %>
            <div class="next-prev-post-section">
                <% if (page.prev){ %>
                    <a href="<%- url_for(page.prev.path) %>" id="prev-page" class="pn-section">
                        <h2 id="prev-page-title"><%= __("prev") %>:</h2>
                        <p class="styled-border"><% if (page.prev.title){ %>
                            <%= page.prev.title %>
                            <% } else { %>
                            (no title)
                            <% } %>
                        </p>
                    </a>
                <% }else{ %>
                    <a href="#"></a>
                <% } %>
                <% if (page.next){ %>
                    <a href="<%- url_for(page.next.path) %>" id="next-page" class="pn-section">
                        <h2 id="next-page-title"><%= __("next") %>:</h2>
                        <p class="styled-border">
                            <% if (page.next.title){ %>
                            <%= page.next.title %>
                            <% } else { %>
                            (no title)
                            <% } %></p>
                    </a>
                <% }else{ %>
                    <a href="#"></a>
                <% } %>
            </div>
            <% } %>
    </div>
</footer>

【以下回答由 GPT 生成】

我很抱歉,但是您并没有给出具体的问题,因此无法为您提供解决方案。如果您有任何技术问题或需求,请提供具体的问题描述,我会竭尽全力来帮助您。



【相关推荐】


  • 这篇博客: Hexo添加相册中的 关于 部分也许能够解决你的问题。

如果你已经解决了该问题, 非常希望你能够分享一下解决方案, 写成博客, 将相关链接放在评论区, 以帮助更多的人 ^-^