imhanjie / gridea-theme-pure

一款专为 Gridea 设计的主题 - 简约、漂亮。
https://imhanjie.com/
GNU Affero General Public License v3.0
272 stars 30 forks source link

error: post is not defined in the about.ejs file #28

Closed haitao127 closed 3 years ago

haitao127 commented 3 years ago

新版1.3.0中,如果选中“记录文章访问量”,在预览或同步时会报错:

Render custom page error
      C://Users/Haitao/Documents/Gridea/themes/gridea-theme-pure-1.3.0/templates/about.ejs:19
    17|         <br>
    18|         <% if(site.customConfig['valine'] && site.customConfig['visitor']) { %>
 >> 19|             <span id="/<%= post.link.split('/')[3] %>/" class="leancloud_visitors" data-flag-title="<%= post.title %>">
    20|                 <em class="post-meta-item-text">阅读量 </em>
    21|                 <i class="leancloud-visitors-count">0</i>
    22|             </span>

post is not defined

看样子应该是有关新增功能“根目录级别关于页面”的小BUG。

imhanjie commented 3 years ago

除了关于页面渲染会报错,其他文章页面会报错吗?

haitao127 commented 3 years ago

除了关于页面渲染会报错,其他文章页面会报错吗?

其他页面不会报错,而且如果关闭Gridea设置中的“记录文章访问量”开关,关于页面也不会报错。

imhanjie commented 3 years ago

OK 明白了

imhanjie commented 3 years ago

试下最新的 1.3.1 试试,在关于页面我删除了 post 相关的引用。

haitao127 commented 3 years ago

试下最新的 1.3.1 试试,在关于页面我删除了 post 相关的引用。

好的,问题已解决,谢谢。