admin管理员组

文章数量:1426455

I am using this mand to run a hugo project in my MacBook Pro with M1 chip:

hugo new site example
cd example
hugo server

the output log like this:

➜  example hugo server
Start building sites …
hugo v0.92.0+extended darwin/arm64 BuildDate=unknown
WARN 2022/03/27 15:49:33 found no layout file for "HTML" for kind "home": You should create a template file which matches Hugo Layouts Lookup Rules for this bination.
WARN 2022/03/27 15:49:33 found no layout file for "HTML" for kind "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this bination.
WARN 2022/03/27 15:49:33 found no layout file for "HTML" for kind "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this bination.

                   | EN
-------------------+-----
  Pages            |  3
  Paginator pages  |  0
  Non-page files   |  0
  Static files     |  0
  Processed images |  0
  Aliases          |  0
  Sitemaps         |  1
  Cleaned          |  0

Built in 4 ms
Watching for changes in /example/{archetypes,content,data,layouts,static}
Watching for config changes in /example/config.toml
Environment: "development"
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop
WARN 2022/03/27 15:49:36 found no layout file for "HTML" for kind "home": You should create a template file which matches Hugo Layouts Lookup Rules for this bination.

when I access the url http://localhost:1313/, the web page was blank. why did this happen? what should I do to fix it? At least make it show the default page.

I am using this mand to run a hugo project in my MacBook Pro with M1 chip:

hugo new site example
cd example
hugo server

the output log like this:

➜  example hugo server
Start building sites …
hugo v0.92.0+extended darwin/arm64 BuildDate=unknown
WARN 2022/03/27 15:49:33 found no layout file for "HTML" for kind "home": You should create a template file which matches Hugo Layouts Lookup Rules for this bination.
WARN 2022/03/27 15:49:33 found no layout file for "HTML" for kind "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this bination.
WARN 2022/03/27 15:49:33 found no layout file for "HTML" for kind "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this bination.

                   | EN
-------------------+-----
  Pages            |  3
  Paginator pages  |  0
  Non-page files   |  0
  Static files     |  0
  Processed images |  0
  Aliases          |  0
  Sitemaps         |  1
  Cleaned          |  0

Built in 4 ms
Watching for changes in /example/{archetypes,content,data,layouts,static}
Watching for config changes in /example/config.toml
Environment: "development"
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop
WARN 2022/03/27 15:49:36 found no layout file for "HTML" for kind "home": You should create a template file which matches Hugo Layouts Lookup Rules for this bination.

when I access the url http://localhost:1313/, the web page was blank. why did this happen? what should I do to fix it? At least make it show the default page.

Share Improve this question asked Mar 27, 2022 at 7:55 DolphinDolphin 39.5k102 gold badges377 silver badges721 bronze badges 2
  • 1 You should make a homepage... _index.md and a layout for it: index.html (and probably baseof.html, etc. etc. etc.) : gohugo.io/getting-started/quick-start – Rogelio Commented Mar 27, 2022 at 19:42
  • The warning only tells you that you should create 'a layout' for home, not the homepage. List pages can be omitted. I am not sure if the same is the case for the homepage (or if you already created such a page). – Mr. Hugo Commented Apr 2, 2022 at 20:06
Add a ment  | 

3 Answers 3

Reset to default 1

You can also get this error (WITH a content/_index.md and corresponding layouts/index.html) if you neglect to define your theme in the config.toml (DAMHIKT)

I had the same issue and solved it by upgrading my version of hugo with brew update; brew upgrade hugo (Hugo Update Instructions). Then try following the quick start guide again.

You can check your version of hugo with hugo version (my version is now hugo v0.115.1). The quickstart instructions currently state you must have version v0.112.0 or later (Hugo Quick Start Guide).

To anyone getting this error while trying to give Hugo a quick whirl: the binary package from your distro might be out of date (mine was v0.88, we're currently at 0.113).

Try using the Go toolchain (i.e. "build from source") :

go install github./gohugoio/hugo@latest

or, if you want the "extended edition":

CGO_ENABLED=1 go install -tags extended github./gohugoio/hugo@latest

Now if you didn't have the Go toolchain installed already, forget about that blog you were about to write, and consider learning Go instead. The world probably doesn't need another blog anyway, but it might need a few more coders :-J.

本文标签: javascriptfound no layout file for quotHTMLquot for kind quothomequotStack Overflow