gohugoio / hugo

The world’s fastest framework for building websites.
https://gohugo.io
Apache License 2.0
74.63k stars 7.45k forks source link

it can't apply themes from server #1361

Closed imkimchi closed 9 years ago

imkimchi commented 9 years ago

when i input this command

hugo server --theme=hyde --buildDrafts

  • ERROR: 2015/08/18 template: theme/partials/head.html:14:39: executing "theme/partials/head.html" at <.Site.BaseURL>: BaseURL is not a field of struct type *hugolib.SiteInfo in theme/partials/head.html
  • ERROR: 2015/08/18 template: theme/partials/sidebar.html:4:23: executing "theme/partials/sidebar.html" at <.Site.BaseURL>: BaseURL is not a field of struct type *hugolib.SiteInfo in theme/partials/sidebar.html
  • ERROR: 2015/08/18 template: theme/partials/head.html:14:39: executing "theme/partials/head.html" at <.Site.BaseURL>: BaseURL is not a field of struct type *hugolib.SiteInfo in theme/partials/head.html
  • ERROR: 2015/08/18 template: theme/partials/sidebar.html:4:23: executing "theme/partials/sidebar.html" at <.Site.BaseURL>: BaseURL is not a field of struct type *hugolib.SiteInfo in theme/partials/sidebar.html
  • ERROR: 2015/08/18 template: theme/partials/head.html:14:39: executing "theme/partials/head.html" at <.Site.BaseURL>: BaseURL is not a field of struct type *hugolib.SiteInfo in theme/partials/head.html
  • ERROR: 2015/08/18 template: theme/partials/head.html:14:39: executing "theme/partials/head.html" at <.Site.BaseURL>: BaseURL is not a field of struct type *hugolib.SiteInfo in theme/partials/head.html
  • ERROR: 2015/08/18 template: theme/partials/sidebar.html:4:23: executing "theme/partials/sidebar.html" at <.Site.BaseURL>: BaseURL is not a field of struct type *hugolib.SiteInfo in theme/partials/sidebar.html
  • ERROR: 2015/08/18 template: theme/partials/sidebar.html:4:23: executing "theme/partials/sidebar.html" at <.Site.BaseURL>: BaseURL is not a field of struct type *hugolib.SiteInfo in theme/partials/sidebar.html
  • ERROR: 2015/08/18 template: theme/partials/head.html:14:39: executing "theme/partials/head.html" at <.Site.BaseURL>: BaseURL is not a field of struct type hugolib.SiteInfo in theme/partials/head.html ERROR: 2015/08/18 template: theme/partials/sidebar.html:4:23: executing "theme/partials/sidebar.html" at <.Site.BaseURL>: BaseURL is not a field of struct type hugolib.SiteInfo in theme/partials/sidebar.html ERROR: 2015/08/18 template: theme/partials/head.html:14:39: executing "theme/partials/head.html" at <.Site.BaseURL>: BaseURL is not a field of struct type hugolib.SiteInfo in theme/partials/head.html ERROR: 2015/08/18 template: theme/partials/sidebar.html:4:23: executing "theme/partials/sidebar.html" at <.Site.BaseURL>: BaseURL is not a field of struct type hugolib.SiteInfo in theme/partials/sidebar.html ERROR: 2015/08/18 Error while rendering 404 page: template: theme/404.html:8:123: executing "theme/404.html" at <.Site.BaseURL>: BaseURL is not a field of struct type *hugolib.SiteInfo

getting the error like that.

how can i solve this problem?

bep commented 9 years ago

Duplicates http://discuss.gohugo.io/t/i-cant-apply-hugo-themes-from-the-server/1588

imkimchi commented 9 years ago

i wrote that huh

adrianduke commented 9 years ago

.Site.BaseUrl got renamed to .Site.BaseURL in hugo 0.15 (AFAIK). I had the opposite problem your having (upgrading from 0.14 to 0.15-DEV) and replaced all instances of the former with the latter, which fixed my issue.

Try updating your version of hugo to 0.15, or replacing all instances of .Site.BaseURL with .Site.BaseUrl

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.