Candinya / Kratos-Rebirth

一个可爱而现代的 Hexo 主题
GNU General Public License v3.0
638 stars 79 forks source link

Bug 回报:关于新设置好友面问题 #59

Closed greenhandzdl closed 3 years ago

greenhandzdl commented 3 years ago
  1. 对Bug的描述: 该Bug导致无法正常渲染页面等等。

  2. 复现Bug的方法: 部分报错

    ERROR Theme config load failed.
    ERROR {
    err: YAMLException: bad indentation of a mapping entry (159:86)
    
    156 |  ...
    157 |  ...
    158 |  ...
    159 |  ...                    description: "好伙伴们在哪里~"
    ------------------------------------------^
    160 |  ...
    161 |  ...                  - name: "Talk"

    我的修改

    # Friends 友链相关内容
    friends:
    href: "friends"
    page:
    title: "好伙伴们"
    comments: false                                                       description: "好伙伴们在哪里~"
    updated: "2021-01-18"
    list:                                                                 - name: "Talk"
    bio: "Talk"
    avatar: "../images/avatar.webp"
    link: "http://ghome.byethost10.com/"                            verify: true # 验证 每个友链的可访问性,炸了会有提示
  3. 运行环境(如果该Bug的产生和环境有关,例如浏览器不兼容导致):

greenhandzdl commented 3 years ago

emmm,这个问题好像是我部分复制时或者… 不知道该怎么说,我复制下来的时候缩进全是空格,刚刚稍微改了下,能正常跑了

greenhandzdl commented 3 years ago

能不能解释下友链部分在哪里出现,我首页翻了个遍也没翻到,怀疑是我自己设置出了问题

vensing commented 3 years ago

友链设置的样例是在:_config.yml.example 最后边 friends 里设置,按照类似的属性在你的主题配置文件中进行配置即可

Candinya commented 3 years ago

https://github.com/Candinya/Kratos-Rebirth/blob/c583082547532c0532d59d3271b5d9f95e45bdfe/_config.yml.example#L154-L166

请记得注意 list 的样式哦,每一大项一开始是需要使用一个 - 作为起始,以表明这是一项列表元素的呢

另外当您指定了 页面 href 参数为 friends 的话,那么应该会将友链页面注入到 http(s)://您的站点/friends/ 这个页面呢,您可以尝试直接访问试一试的说

greenhandzdl commented 3 years ago

没问题了