Closed joacimmelin closed 7 years ago
I haven't used hugo in a long time so it's going to be tough to diagnose this without more information. Can you give me access to your content repository?
Haven't used hugo in a while either, but I think I was able to reproduce the problem with a clean setup.
@joacimmelin, do your errors also include Error while rendering "page": template: theme/_default/single.html:5:47: executing "theme/_default/single.html" at <.Site.Params.datefor...>: invalid value; expected string
? Or is that completely unrelated?
@tummychow Here you go. :) posts.tar.gz
Can you try adding
[params]
DateForm = "Mon Jan 2, 2006"
to your config.toml?
All but 11 of your 7000ish posts build fine for me. The 11 that don't have dates that hugo fails to parse.
@ryan-robeson Are you running the latest version of Lanyon for Hugo?
I get this:
Mac-Pro:macpro joacim$ hugo server Started building sites ... ERROR 2017/06/06 17:53:50 Failed to parse date '-001-11-30T00:00:00+00:00' in page post/2016-11-30-.md ERROR 2017/06/06 17:53:50 Failed to parse date '-001-11-30T00:00:00+00:00' in page post/2016-12-14-.md ERROR 2017/06/06 17:53:50 Failed to parse date '-001-11-30T00:00:00+00:00' in page post/2017-01-16-.md ERROR 2017/06/06 17:53:50 Failed to parse date '-001-11-30T00:00:00+00:00' in page post/2017-04-05-.md ERROR 2017/06/06 17:53:50 Failed to parse date '-001-11-30T00:00:00+00:00' in page post/2017-04-21-.md ERROR 2017/06/06 17:53:50 Failed to parse date '-001-11-30T00:00:00+00:00' in page post/2017-05-28-.md Built site for language en: 0 of 6 drafts rendered 0 future content 0 expired content 6119 regular pages created 100 other pages created 0 non-page files copied 0 paginator pages created 14 categories created 32 tags created total in 1920 ms Watching for changes in /Users/joacim/macpro/{data,content,layouts,static} Serving pages from memory Web Server is available at http://localhost:1313/ (bind address 127.0.0.1) Press Ctrl+C to stop
.. which seems good but when I try to access http://localhost:1313 all I get is a blank page.
Yes, latest hugo and cloned lanyon-hugo 2 days ago. Running hugo
I get:
Started building sites ...
ERROR 2017/06/06 11:49:41 Failed to parse date '2014-10-15 15:30' in page post/2014-10-15-detta-lanserar-apple-pa-torsdag.markdown
ERROR 2017/06/06 11:49:41 Failed to parse date '2014-10-17 10:20' in page post/2014-10-17-ny-mac-mini-ett-steg-bakat.markdown
ERROR 2017/06/06 11:49:41 Failed to parse date '2014-10-17 11:00' in page post/2014-10-17-rackmontering-for-nya-macpro.markdown
ERROR 2017/06/06 11:49:41 Failed to parse date '2014-10-18 14:40' in page post/2014-10-18-detta-kallas-utpressning.markdown
ERROR 2017/06/06 11:49:41 Failed to parse date '2014-10-18 18:55' in page post/2014-10-18-retina-imac-apples-nya-proffsdator.markdown
ERROR 2017/06/06 11:49:41 Failed to parse date '2014-10-18 15:20' in page post/2014-10-18-nya-macpro-officiellt-godkand-for-vmware-esxi-5-5.markdown
ERROR 2017/06/06 11:49:41 Failed to parse date '2014-10-18 14:30' in page post/2014-10-18-spotlight-i-yosemite-lacker-information-till-apple-och-microsoft.markdown
ERROR 2017/06/06 11:49:41 Failed to parse date '2015-05-04 19:7:00' in page post/2015-05-04-agarna-dumpar-wywallet.markdown
ERROR 2017/06/06 11:49:41 Failed to parse date '2015-06-08 08:35' in page post/2015-05-08-sla-av-turboboost-for-battre-batteritid.markdown
ERROR 2017/06/06 11:49:41 Failed to parse date '2015-05-31 10:55' in page post/2015-05-31-googles-dronare-kraschade-efter-start.markdown
ERROR 2017/06/06 11:49:41 Failed to parse date '2015-06-08 08:35' in page post/2015-06-08-smart-alternativ-till-pingdom.markdown
Built site for language en:
0 draft content
0 future content
0 expired content
7015 regular pages created
1454 other pages created
1 non-page files copied
702 paginator pages created
698 tags created
25 categories created
total in 32995 ms
You said you're new to hugo. Did you set the theme in config.toml
?
theme = "lanyon-hugo"
Config I'm currently testing with for reference:
baseURL = "http://example.org/"
languageCode = "en-us"
title = "My New Hugo Site"
theme = "lanyon-hugo"
[params]
DateForm = "Mon Jan 2, 2006"
Working! I had to use -t lanyon-hugo for it to work properly. I does not seem to care about putting the theme value in the config-file.
Thank you!
I really regret making the date format configurable.
Thanks for your help, @ryan-robeson.
@joacimmelin weird that it's ignoring your config. Glad the command line flag is working for you though!
@tummychow No problem.
Related: I was looking at sending a quick PR to update the README with a note about this when I realized this project was designed to be cloned and modified directly. Re-reading #2 clarified that you created this before themes were a thing in Hugo. So, I'm just going to send a quick PR to add a default date format.
@joacimmelin if you cloned this repo into your themes/
directory, you may want to take a look at its config.json
and see if there are any settings (e.g. permalinks) you want to copy over to your main config. I'm fairly certain config settings are not inherited from themes.
... I get this for every single post I have when I generate the site:
ERROR 2017/06/04 11:26:36 in .Render: Failed to execute template "theme/_default/li.html" for page "post/2004-04-28-netdiagx-i-ny-version.md"
I have no idea even where to start looking. So any help is more than welcome.
Thanks,
Joacim