HugoBlox / hugo-blox-builder

🚨 GROW YOUR AUDIENCE WITH HUGOBLOX! 🚀 HugoBlox is an easy, fast no-code website builder for researchers, entrepreneurs, data scientists, and developers. Build stunning sites in minutes. 适合研究人员、企业家、数据科学家和开发者的简单快速无代码网站构建器。用拖放功能、可定制模板和内置SEO工具快速创建精美网站!
https://hugoblox.com/templates/
MIT License
8.2k stars 2.9k forks source link

Failed to render "theme/index.html" #331

Closed pat-s closed 7 years ago

pat-s commented 7 years ago

Hugo 0.30.2

hugo-academic @commit: https://github.com/gcushen/hugo-academic/tree/41d0123b54727498c65891747965b39fb48baa85

The error looks theme related. I have no clue what could be the problem - any idea?

I think I implemented all "breaking changes" from v2.0.0.

Started building sites ...
ERROR 2017/10/19 22:14:47 Failed to render "theme/index.html": reflect: Zero(nil)
gcushen commented 7 years ago

Did you add the theme parameters to your [params] section in config.toml?

[params]
  # Color theme.
  #   Choose from `default`, `ocean`, `forest`, or `coffee`.
  color_theme = "default"

  # Font style.
  #   Choose from `default`, `classic`, or `playfair`.
  font = "default"
pat-s commented 7 years ago

Yes I added them.

Here is my config.toml. Thanks for your time 👍

gcushen commented 7 years ago

Thanks for the config, I reproduced the error. The issue is that [outputs] must be added:

# Default language to use (if you setup multilingual support)
defaultContentLanguage = "en"
defaultContentLanguageInSubdir = false

[outputs]
  home = [ "HTML", "CSS" ]

[blackfriday]
  hrefTargetBlank = true  # `true` opens external links in a new tab.
  fractions = true  # `false` disables smart fractions (e.g. 5/12 formatted as a fraction).
  smartypants = true  # `false` disables all smart punctuation substitutions (e.g. smart quotes, dashes, fractions).

I'll update the Release Notes if it's missing this information :)

pat-s commented 7 years ago

@gcushen thanks!

I added it; however the error persists for me 🤔 Anything else that I am missing in my config?

gcushen commented 7 years ago

@pat-s I tested your config with [outputs] added and it appears to work fine with the exampleSite content. Therefore, it is likely that your content files are missing some of the new content parameters. Reading the Release Notes and comparing the parameters in the exampleSite content with the parameters in your content frontmatter may help. Also, the error message should not be exactly the same if you updated the config file, so it may help if you can post the new error message...

pat-s commented 7 years ago

Thanks for taking the time 👍

I did some debugging and error seems to be caused by themes/academic/layouts/index.html.

If I remove this file from the submodule, the error goes away and the site builds without error. However, my site main page looks unstructured then as index.html is not build properly 🤔

Maybe you have some time to clone my repo and see for yourself :)

pat-s commented 7 years ago

It works again but I do not know what the important piece was - I changed a lot (including all headers from YAML to TOML) and other stuff - thanks for your patience :+1: