Closed ghost closed 3 years ago
我试了一次没发现问题惹~ _(:з)∠)_
hugo new site quickstart
cd quickstart
git clone https://github.com/olOwOlo/hugo-theme-even themes/even
exampleSite/config.toml
覆盖 quickstart/config.toml
hugo new post/my-first-post.md
my-first-post.md 的内容:
---
title: "My First Post"
date: 2017-10-12T23:52:51+08:00
draft: true
---
some content.
hugo server -D
我的 hugo 版本是 0.29。
quickstart/layout
目录下没有别的主题的遗留文件吧?
或者你可以提供一下源文件~
我也遇到了相同的问题。我是把Hexo博客的md文件全部直接放到Hugo的content/post文件夹下,结果生成的网站,首页为空。
@kingname 表示重现不出来(:з)∠),能否提供一个 md 文件让我试试~~
I've found the reason why.....
hugo quickstart里面教的是/content/posts 但@olOwOlo 的模板用的是/content/post
大概,感觉还是用quickstart里教的比较好吧
@Mintpix 我参考的几个主题也都是用的 post 而不是 posts 呢,现在更改的话也会给更新主题的同学带来麻烦。而且上面的两位小伙伴都是用的 content/post 呢,所以应该不是这个原因。
@olOwOlo 诶..是我搞错了。但是我一开始也不能render post,后来才发现目录搞错了.
感谢一下作者这么漂亮的主题
@olOwOlo 我也遇到了这个问题, 最后发现是目录搞错了.
建议在readme中加一下说明.
同上目录问题,主页没有内容显示,archives显示404.
quickstart 中是 hugo new posts/my-first-post.md
应该是hugo new post/my-first-post.md
类似的问题,猜测似乎首页对于渲染路径,只能是post。把config.toml拿来后,我的首页也是空白,然后进入archive显示404。查了一下,发现我之前的路径是posts的,之后将下面的配置改成posts
···
[[menu.main]]
name = "Archives"
weight = 20
identifier = "archives"
url = "/posts/" #原来是post
···
这时候,archives能进入,也就是 http://localhost:1313/posts/
,但是首页依然是空白。
然后我把自己的posts
目录改成post
,在把之前config.toml改回原来的post
。然后都完美跑起来了。
注意两点 1. content/post 2. hugo server -D 参数
类似的问题,猜测似乎首页对于渲染路径,只能是post。把config.toml拿来后,我的首页也是空白,然后进入archive显示404。查了一下,发现我之前的路径是posts的,之后将下面的配置改成posts
··· [[menu.main]] name = "Archives" weight = 20 identifier = "archives" url = "/posts/" #原来是post ···
这时候,archives能进入,也就是
http://localhost:1313/posts/
,但是首页依然是空白。然后我把自己的
posts
目录改成post
,在把之前config.toml改回原来的post
。然后都完美跑起来了。
确实是,我发现了其他有的主题也是这种情况
我也遇到了。。按照官方文档,文章应该放在 content 目录下都可以吧,这个能不能提供一个配置呢?
我也遇到了。。按照官方文档,文章应该放在 content 目录下都可以吧,这个能不能提供一个配置呢?
post可以,posts就不行
[params] since = "2019" # Site creation time # 站点建立时间,必须早于发布文章的事件否则文章不显示
把config.toml拿来后,我的首页也是空白,然后进入archive显示404。查了一下,发现我之前的路径是posts的,之后将下面的配置改成帖子
··· [[menu.main]] name = "Archives" weight = 20 identifier = "archives" url = "/posts/" #原来是post ···
这时候,archives能进入,也就是
http://localhost:1313/posts/
,但是首页依然是空白。 然后我把自己的posts
目录改成post
,在把之前config.toml改回原来的post
。然后都完美跑起来了。确实是,我发现了其他有的主题也是这种情况
尴尬了,我目录没问题,首页也还是没内容。但是归档那边还是有内容的。
还是说不能使用中文标题呢?没道理呀。
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this is a bug and you can still reproduce this error on the master
branch, please reply with all of the information you have about it in order to keep the issue open.
post、posts,网上教程真是坑多
我用了 paper 主题,也是类似的问题,把 posts文件加改成 post ,首页文章列表才显示了。
操作系统 Debian 9
按照说明配置后,
http://localhost:1313/
首页不显示文章内容,但手动输入地址可以显示内容。以
content/post/my-first-post.md
为例(目录中只有这么一个文件),手动输入http://localhost:1313/post/my-first-post/
,可以显示内容。点击
Archives
,浏览器地址为http://localhost:1313/post/
,也没有文章列表显示。quickstart/config.toml
是按照说明从even
主题目录中复制过去的,几乎没有更改其中的参数值。我需要如何操作才能在主页正常显示文章列表(如demo展示的那样)。