tummychow / lanyon-hugo

Port of poole/lanyon, to spf13/hugo
tummychow.github.io/lanyon-hugo
MIT License
162 stars 78 forks source link

Your Theme's Demo is not generating on the Hugo website #25

Closed onedrawingperday closed 6 years ago

onedrawingperday commented 6 years ago

Hi @tummychow

When I execute the Hugo Themes Site Build Script I get the following console ERROR with your theme:

==== PROCESSING  lanyon  ====== 
Building site for theme lanyon using config "config-lanyon.toml" to ../themeSite/static/theme/lanyon/
ERROR 2018/11/09 13:32:03 render of "page" failed: execute of template failed: template: _default/single.html:1:3: executing "_default/single.html" at <partial "default_hea...>: error calling partial: "/hugoThemes/lanyon/layouts/partials/default_head.html:22:46": execute of template failed: template: partials/default_head.html:8:7: executing "partials/default_head.html" at <partial "sidebar.htm...>: error calling partial: "/hugoThemes/lanyon/layouts/partials/sidebar.html:22:46": execute of template failed: template: partials/sidebar.html:22:46: executing "partials/sidebar.html" at <.Site.Params.github....>: can't evaluate field url in type interface {}

FAILED to create demo site for lanyon

It seems that your theme needs to have its own Example Site and that it currently fails because it relies on the Hugo Basic Example.

Also I noticed that you have a /content/ folder under the root of your theme's repo. This directory will need to go under /exampleSite/

Can you please look into the above?

Thanks!

CC /@digitalcraftsman

tummychow commented 6 years ago

sounds like i can fix this by just moving /content to /exampleSite? lemme try it later this weekend and get back to you

onedrawingperday commented 6 years ago

Actually @tummychow it seems that you need to create a custom config.toml for the Example Site so that Hugo can find .Site.Params.github etc. in your sidebar partial.

For a sample of the Example Site directory please have a look at the Ananke Theme repository and at the updated Hugo Themes README .

Once you do the above please let me know so that either I or @digitalcraftsman can have a further look.

Also if you have any questions do not hesitate to ask.

Thank you!

tummychow commented 6 years ago

@onedrawingperday thanks for explaining. I've got a branch (https://github.com/tummychow/lanyon-hugo/tree/example-site) which seems to fix the issue when I regenerate the theme site locally. Could you give it a spin and confirm/deny that it works for you? If it works, I'll merge the branch to master and you can update the submodule sha accordingly.

onedrawingperday commented 6 years ago

Hi @tummychow and thanks for pushing the changes.

I confirm that now your theme's demo generates fine with the Hugo Site Build Script.

So please merge the branch to master and let me know.

Thank you! 👍

tummychow commented 6 years ago

just merged to master. thanks for flagging the issue and let me know if you run into any other problems getting the example site to work

onedrawingperday commented 6 years ago

The Demo will work again on the Hugo website once @digitalcraftsman updates all theme submodules.

Thanks.

digitalcraftsman commented 5 years ago

I've updated all themes. Their changes should show up in a few minutes on the Hugo theme site.