Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Front Matter 中 Copyright 设置出现问题 #116

Closed
guanqr opened this issue Apr 16, 2020 · 3 comments
Closed

Front Matter 中 Copyright 设置出现问题 #116

guanqr opened this issue Apr 16, 2020 · 3 comments
Labels
bug Something isn't working upstream

Comments

@guanqr
Copy link

guanqr commented Apr 16, 2020

设置 original = false,然后自定义作者 author,如果不添加 website 的内容,作者一栏的冒号 会消失。

如果是下面这样显示正常:

original = false
author = "GitHub"
website = "https://github.com/"
link = "https://github.com/"
copyright = "[CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/deed.zh)"

如果是下面这样,会缺少冒号:

original = false
author = "GitHub"
link = "https://github.com/"
copyright = "[CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/deed.zh)"

2020-04-16_093911

@guanqr
Copy link
Author

guanqr commented Apr 16, 2020

另外更新到 Hugo 0.69.0 版本后,采用 sections 进行文章分类,在分类页面如果设置开启显示每一分类下的文章数,即 displayPostsCount = true,会报错。显示主题中的 tree-sections.html 代码有问题。但在 0.68.3 版本中没有报错,不知道是主题的问题还是 Hugo 的问题。

Error: Error building site: failed to render pages: render of "section" failed: execute of template failed: template: section/categories.html:2:7: executing "main" at <partial "pages/tree-sections.html" .>: error calling partial: "/opt/build/repo/themes/meme/layouts/partials/pages/tree-sections.html:25:79": execute of template failed: template: partials/pages/tree-sections.html:25:79: executing "partials/pages/tree-sections.html" at <len $pages>: error calling len: len of untyped nil

@reuixiy
Copy link
Owner

reuixiy commented Apr 16, 2020

@guanqr

第一个问题已解决。

第二个问题应该是 Hugo 的问题,已提交 Issue,见 gohugoio/hugo#7178

@reuixiy
Copy link
Owner

reuixiy commented Apr 24, 2020

Seems fixed in v0.69.2.

@reuixiy reuixiy closed this as completed Apr 24, 2020
ulmefors pushed a commit to ulmefors/hugo-theme-meme that referenced this issue Nov 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream
Projects
None yet
Development

No branches or pull requests

2 participants