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

Error building site: failed to render pages: render of "home" failed #72

Closed
sbuvaneshkumar opened this issue Sep 19, 2019 · 13 comments · Fixed by #95
Closed

Error building site: failed to render pages: render of "home" failed #72

sbuvaneshkumar opened this issue Sep 19, 2019 · 13 comments · Fixed by #95

Comments

@sbuvaneshkumar
Copy link

sbuvaneshkumar commented Sep 19, 2019

After adding theme, I am getting following error.
I have tried with brand new site, without any content, facing the same issue.

➜  quickstart git:(master) ✗ hugo server -D          
Building sites … WARN 2019/09/19 17:58:56 Page's .RSSLink is deprecated and will be removed in a future release. Use the Output Format's link, e.g. something like: 
    {{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}.
Total in 7 ms
Error: Error building site: failed to render pages: render of "home" failed: "/root/quickstart/themes/hugo-goa/layouts/index.html:2:11": execute of template failed: template: index.html:9:3: executing "index.html" at <partial "main_menu.html" .>: error calling partial: "/root/quickstart/themes/hugo-goa/layouts/partials/main_menu.html:2:11": execute of template failed: template: partials/main_menu.html:2:11: executing "partials/main_menu.html" at <sort .Site.Menus.main>: error calling sort: sequence must be provided

➜  quickstart git:(master) ✗ hugo version   
Hugo Static Site Generator v0.58.2-253E5FDC linux/amd64 BuildDate: 2019-09-13T08:05:59Z

➜  quickstart git:(master) ✗ cat config.toml 
baseURL = "http://example.org/"
languageCode = "en-us"
title = "My New Hugo Site"
theme = "hugo-goa"

➜  quickstart git:(master) ✗ ll themes/hugo-goa 
total 20K
drwxr-xr-x. 2 root root   24 Sep 19 17:57 archetypes
drwxr-xr-x. 6 root root  131 Sep 19 17:57 exampleSite
drwxr-xr-x. 2 root root   42 Sep 19 17:57 images
drwxr-xr-x. 4 root root   72 Sep 19 17:57 layouts
-rw-r--r--. 1 root root 1.1K Sep 19 17:57 LICENSE
-rw-r--r--. 1 root root  12K Sep 19 17:57 README.md
drwxr-xr-x. 5 root root  217 Sep 19 17:57 static
-rw-r--r--. 1 root root  480 Sep 19 17:57 theme.toml
@connor11528
Copy link

I am getting the same error. @sbuvaneshkumar did you find a solution or workaround for this?

@sbuvaneshkumar
Copy link
Author

@connor11528 Unfortunately no, still I don't find any workaround or solution.

@pferretti
Copy link

Hi @sbuvaneshkumar @connor11528
I think that you must specify at least a main menu entry in config.toml. For example:

[[menu.main]]
name = "about"
identifier = "about"
weight = 200
url = "/about/"

@connor11528
Copy link

Okay thank you @pferretti

I added this and am getting an error on the command line. For all my files in content/posts/ directory I have the date saved like: date: "2017-11-26" any ideas what more I need to improve?

$ hugo server -D
Building sites … WARN 2020/01/12 18:11:09 Page.RSSLink is deprecated and will be removed in a future release. Use the Output Format's link, e.g. something like:
    {{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}
ERROR 2020/01/12 18:11:09 render of "section" failed: "/Users/connorleech/Projects/connorleech.info/themes/hugo-goa/layouts/_default/list.html:7:55": execute of template failed: template: _default/list.html:3:3: executing "_default/list.html" at <partial "li.html" .>: error calling partial: "/Users/connorleech/Projects/connorleech.info/themes/hugo-goa/layouts/partials/li.html:7:55": execute of template failed: template: partials/li.html:7:55: executing "partials/li.html" at <.Site.Params.dateformat>: invalid value; expected string
ERROR 2020/01/12 18:11:09 render of "page" failed: "/Users/connorleech/Projects/connorleech.info/themes/hugo-goa/layouts/_default/single.html:8:67": execute of template failed: template: _default/single.html:3:3: executing "_default/single.html" at <partial "content.html" .>: error calling partial: "/Users/connorleech/Projects/connorleech.info/themes/hugo-goa/layouts/partials/content.html:8:67": execute of template failed: template: partials/content.html:8:67: executing "partials/content.html" at <.Site.Params.dateformat>: invalid value; expected string
ERROR 2020/01/12 18:11:09 render of "page" failed: "/Users/connorleech/Projects/connorleech.info/themes/hugo-goa/layouts/_default/single.html:8:67": execute of template failed: template: _default/single.html:3:3: executing "_default/single.html" at <partial "content.html" .>: error calling partial: "/Users/connorleech/Projects/connorleech.info/themes/hugo-goa/layouts/partials/content.html:8:67": execute of template failed: template: partials/content.html:8:67: executing "partials/content.html" at <.Site.Params.dateformat>: invalid value; expected string
ERROR 2020/01/12 18:11:09 render of "page" failed: "/Users/connorleech/Projects/connorleech.info/themes/hugo-goa/layouts/_default/single.html:8:67": execute of template failed: template: _default/single.html:3:3: executing "_default/single.html" at <partial "content.html" .>: error calling partial: "/Users/connorleech/Projects/connorleech.info/themes/hugo-goa/layouts/partials/content.html:8:67": execute of template failed: template: partials/content.html:8:67: executing "partials/content.html" at <.Site.Params.dateformat>: invalid value; expected string
Built in 74 ms
Error: Error building site: failed to render pages: render of "page" failed: "/Users/connorleech/Projects/connorleech.info/themes/hugo-goa/layouts/_default/single.html:8:67": execute of template failed: template: _default/single.html:3:3: executing "_default/single.html" at <partial "content.html" .>: error calling partial: "/Users/connorleech/Projects/connorleech.info/themes/hugo-goa/layouts/partials/content.html:8:67": execute of template failed: template: partials/content.html:8:67: executing "partials/content.html" at <.Site.Params.dateformat>: invalid value; expected string

@connor11528
Copy link

Okay nvm, I think I was just missing some configuration options. I added the config and everything is working now. I believe this issue can be closed out

Based config from the exampleSite (doh)

## Basic Configuration

baseurl = "https://shenoybr.github.io/hugo-goa-demo/"
builddrafts = false
canonifyurls = false
languageCode = "en-US"

contentdir = "content"
layoutdir = "layouts"
publishdir = "public"

author = "Erlich Bachman"
title = "Erlich Bachman"

theme = "hugo-goa"

## Hugo Built-in Features
disqusShortname = "https-shenoybr-github-io-hugo-goa-demo" # Comment out to disable Disqus.
googleAnalytics = "XYZ"
enableRobotsTXT = true

## Site Settings
[params]
author = "Erlich Bachman"
intro = "Startup Guru Extraordinaire"
description = "Now @Pied Piper. Previously @Hacker Hostel, @Bachmanity and @Aviato. <br/> \"What is F times 5? It's Fleventy-five.\""
authorimage = "headshot.jpg"
dateformat = "Jan 2, 2006"

## Site Meta Settings
[params.meta]
description = "Simple minimalist theme"
keywords = "minimalist,blog,goa,hugo,developer"

## Social Accounts
[params.social]
github = "<username>"
instagram = "<username>"
xing = "<username>"
linkedin = "<username>"
twitter = "<username>"
facebook = "<username>"
google = "<username>"
googlescholar = "<account_id>"
stackoverflow = "<username>"
lastfm = "<username>"
goodreads = "<username>"
gitlab = "<username>"
bitbucket = "<username>"
fivehundredpx = "<username>"
flickr = "<username>"
foursquare = "<username>"
hackernews = "<username>"
kickstarter = "<username>"
patreon = "<username>"
pintrest = "<username>"
steam = "<username>"
reddit = "<username>"
snapchat = "<username>"
youtube = "<channelid>"
keybase = "<username>"
twitch = "<username>"
soundcloud = "<username>"
tumblr = "<username>"
strava = "<username>"
skype = "<username>"
telegram = "<username>"
whatsapp = "<username>"
email = "[email protected]"
pgp = "<key_fingerprint>"

## Extras
[params.extra]
copyright = "© 2016. Erlich Bachman. [Some Rights Reserved](http://creativecommons.org/licenses/by/3.0/)."
poweredby = true
highlightjs = true
socialmarkup = true
toc = true
displayrssicon = true

## Main Menu
[[menu.main]]
    name = "blog"
    weight = 100
    identifier = "blog"
    url = "/blog/"
[[menu.main]]
    name = "about"
    identifier = "about"
    weight = 200
    url = "/about/"
[[menu.main]]
    name = "coderag"
    identifier = "coderag"
    weight = 300
    url = "/coderag/"

@BackMountainDevil
Copy link

zaventh added a commit to zaventh/hugo-goa that referenced this issue Nov 29, 2020
shenoydotme pushed a commit that referenced this issue Jan 28, 2021
@Ayush23Dash
Copy link

Hi, I am still unable to get solution of this. Can anyone please help me out??

@mubashirjamali101
Copy link

mubashirjamali101 commented Apr 9, 2021

Yeah me too, above solutions didn't work.

@austinschrader
Copy link

@Ayush23Dash @mubashirjamali101 I had this exact issue and it was in the config.toml.

In the theme 'Blonde', there's an exampleSite. I started copying and pasting the exampleSite files into mine, and finally when I got to config.toml the hugo server started running.

Try and find an exampleSite folder in your theme, or download one that does.

@Philip-Valentino
Copy link

I had the same issue, here is how I solved it:

Step 1:
Open config.yaml in your website project in RStudio

Step 2:

Go to the last line in that script in RStudio and type in this (see below) and save it:

security:
funcs:
getenv:
- ^HUGO_
- ^WC_

@duanziheng
Copy link

I had the same issue, here is how I solved it:

Step 1: Open config.yaml in your website project in RStudio

Step 2:

Go to the last line in that script in RStudio and type in this (see below) and save it:

security: funcs: getenv: - ^HUGO_ - ^WC_

don't know why but it really works!

@krischik
Copy link

I have the same problem with an existing site which worked before. Very frustrating. Will there ever be a proper fix?

@shenoydotme
Copy link
Owner

@krischik Can you create a new issue detailing the problem you're facing with steps to reproduce or code / repo that I can use to investigate your problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.