Skip to content

运行 hugo server 后打开的页面是空白 #572

Answered by Lruihao
ych817 asked this question in Q&A
Discussion options

You must be logged in to vote
WARN 2025/02/25 16:02:27 found no layout file for "HTML" for kind "home": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2025/02/25 16:02:27 found no layout file for "HTML" for kind "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.

出现这个,通常是主题未安装成功,检查 themes 目录 FixIt 主题是否下载了,检查一下配置文件里是否包含 theme = 'FixIt'

另外,你的 Hugo 版本过低,请升级到 0.141.0 或以上。

关于添加新页面的命令,在旧的 hugo 版本里是 hugo new posts/my-first-post.md, 后续 Hugo 升级版本后改为了 hugo new content posts/my-first-post.md,同时兼容旧的命令,我认为这是 Hugo 为了区分与新建主题的命令 hugo new theme xxx 而做的改动。

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ych817
Comment options

Answer selected by ych817
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants