Giter Club home page Giter Club logo

Comments (18)

yyydao avatar yyydao commented on June 12, 2024 1

类似的问题,猜测似乎首页对于渲染路径,只能是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。然后都完美跑起来了。

from hugo-theme-even.

e7 avatar e7 commented on June 12, 2024 1

post、posts,网上教程真是坑多

from hugo-theme-even.

olOwOlo avatar olOwOlo commented on June 12, 2024

我试了一次没发现问题惹~ _(:з)∠)_

  1. hugo new site quickstart
  2. cd quickstart
  3. git clone https://github.com/olOwOlo/hugo-theme-even themes/even
  4. exampleSite/config.toml 覆盖 quickstart/config.toml
  5. 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.
    
  6. hugo server -D

我的 hugo 版本是 0.29。
quickstart/layout 目录下没有别的主题的遗留文件吧?
或者你可以提供一下源文件~

from hugo-theme-even.

kingname avatar kingname commented on June 12, 2024

我也遇到了相同的问题。我是把Hexo博客的md文件全部直接放到Hugo的content/post文件夹下,结果生成的网站,首页为空。

image

from hugo-theme-even.

olOwOlo avatar olOwOlo commented on June 12, 2024

@kingname 表示重现不出来_(:з)∠)_,能否提供一个 md 文件让我试试~~

from hugo-theme-even.

Mintpix avatar Mintpix commented on June 12, 2024

I've found the reason why.....

hugo quickstart里面教的是/content/posts 但@olOwOlo 的模板用的是/content/post

大概,感觉还是用quickstart里教的比较好吧

from hugo-theme-even.

olOwOlo avatar olOwOlo commented on June 12, 2024

@Mintpix 我参考的几个主题也都是用的 post 而不是 posts 呢,现在更改的话也会给更新主题的同学带来麻烦。而且上面的两位小伙伴都是用的 content/post 呢,所以应该不是这个原因。

from hugo-theme-even.

Mintpix avatar Mintpix commented on June 12, 2024

@olOwOlo 诶..是我搞错了。但是我一开始也不能render post,后来才发现目录搞错了.

感谢一下作者这么漂亮的主题

from hugo-theme-even.

narrowizard avatar narrowizard commented on June 12, 2024

@olOwOlo 我也遇到了这个问题, 最后发现是目录搞错了.
建议在readme中加一下说明.

from hugo-theme-even.

leonf-tech avatar leonf-tech commented on June 12, 2024

同上目录问题,主页没有内容显示,archives显示404.
quickstart 中是 hugo new posts/my-first-post.md
应该是hugo new post/my-first-post.md

from hugo-theme-even.

HouLPcode avatar HouLPcode commented on June 12, 2024

注意两点 1. content/post 2. hugo server -D 参数

from hugo-theme-even.

monkback avatar monkback commented on June 12, 2024

类似的问题,猜测似乎首页对于渲染路径,只能是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。然后都完美跑起来了。

确实是,我发现了其他有的主题也是这种情况

from hugo-theme-even.

conn4575 avatar conn4575 commented on June 12, 2024

我也遇到了。。按照官方文档,文章应该放在 content 目录下都可以吧,这个能不能提供一个配置呢?

from hugo-theme-even.

monkback avatar monkback commented on June 12, 2024

我也遇到了。。按照官方文档,文章应该放在 content 目录下都可以吧,这个能不能提供一个配置呢?

post可以,posts就不行

from hugo-theme-even.

xmasuhai avatar xmasuhai commented on June 12, 2024

配置参数,HTML中可以引用

[params]
since = "2019" # Site creation time # 站点建立时间,必须早于发布文章的事件否则文章不显示

from hugo-theme-even.

solider245 avatar solider245 commented on June 12, 2024

把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。然后都完美跑起来了。

确实是,我发现了其他有的主题也是这种情况

尴尬了,我目录没问题,首页也还是没内容。但是归档那边还是有内容的。
image

还是说不能使用中文标题呢?没道理呀。

from hugo-theme-even.

stale avatar stale commented on June 12, 2024

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.

from hugo-theme-even.

telzhou618 avatar telzhou618 commented on June 12, 2024

我用了 paper 主题,也是类似的问题,把 posts文件加改成 post ,首页文章列表才显示了。

from hugo-theme-even.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.