orianna-zzo / AllinOne

All in one Hugo theme
MIT License
185 stars 90 forks source link

start error #20

Closed devcui closed 5 years ago

devcui commented 5 years ago

hugo serve --theme=Allinone --buildDrafts

Building sites … ERROR 2018/11/22 22:50:36 render of "taxonomyTerm" failed: execute of template failed: template: _default/terms.html:11:9: executing "header" at <partial "page-header...>: error calling partial: "/Users/ferried/Projects/blog/themes/Allinone/layouts/partials/page-header.html:1:22": execute of template failed: template: partials/page-header.html:1:22: executing "partials/page-header.html" at <len .Site.Params.sli...>: error calling len: len of untyped nil
ERROR 2018/11/22 22:50:36 render of "taxonomyTerm" failed: execute of template failed: template: _default/terms.html:11:9: executing "header" at <partial "page-header...>: error calling partial: "/Users/ferried/Projects/blog/themes/Allinone/layouts/partials/page-header.html:1:22": execute of template failed: template: partials/page-header.html:1:22: executing "partials/page-header.html" at <len .Site.Params.sli...>: error calling len: len of untyped nil
ERROR 2018/11/22 22:50:36 render of "home" failed: execute of template failed: template: index.html:3:6: executing "header" at <partial "homepage-he...>: error calling partial: "/Users/ferried/Projects/blog/themes/Allinone/layouts/partials/homepage-header.html:1:22": execute of template failed: template: partials/homepage-header.html:1:22: executing "partials/homepage-header.html" at <len .Site.Params.sli...>: error calling len: len of untyped nil
Total in 38 ms
Error: Error building site: failed to render pages: render of "page" failed: execute of template failed: template: _default/single.html:11:9: executing "header" at <partial "page-header...>: error calling partial: "/Users/ferried/Projects/blog/themes/Allinone/layouts/partials/page-header.html:1:22": execute of template failed: template: partials/page-header.html:1:22: executing "partials/page-header.html" at <len .Site.Params.sli...>: error calling len: len of untyped nil
devcui commented 5 years ago

copy this to your root's config.toml

baseURL                   = "https://example.com"
builddrafts                = false
languageCode               = "zn-Hans"
canonifyurls               = true
contentdir                 = "content"
layoutdir                  = "layouts"
publishdir                 = "public"
enableEmoji                = true
hasCJKLanguage             = true
summaryLength              = 200
Paginate                   = 3

theme                      = "AllinOne"
title                      = "Orianna"

pygmentsuseclasses         = true

[permalinks]
  blog                     = "blog/:year-:month/:slug/"

[taxonomies]
  tag                      = "tags"
  series                   = "series"
  category                 = "categories"

[menu]
  [[menu.main]]
    name                   = "Blog"
    weight                 = -120
    identifier             = "blog"
    url                    = "blog/"  

  [[menu.main]]
    name                   = "Moment"
    weight                 = -110
    identifier             = "moment"
    url                    = "moment/" 

  [[menu.main]]
    name                   = "About"
    weight                 = -100
    identifier             = "about"
    url                    = "about/"  

[params]
  faviconfile              = "img/zheng.png"               # from static/
  avatar                   = "img/profile.jpg"             # path to image in static dir e.g img/avatar.png 
  author                   = "Orianna"
  description              = ["Be myself.", "Love the wonderful world.", "Do the right things and be a better man."]           # appears in the site header when set to a non-empty string
  welcome_head             = "Hello, World!"
  welcome_word             = "~ No Day But Today ~"

  latestpostscount         = 5                             # how many posts to display on the home page
  bloggroupby              = 'month'
  dateform                 = "Jan 2, 2006"
  dateformfull             = "2006-01-02  Monday  15:04:05"
  noshowreadtime           = false                         # if true, don't show "<x> minutes read" in posts

  # slides
  slidesDirPath            = "themes/AllinOne/static/img/header-slides"    # path to image in local dir (path for hugo)
  slidesDirPathURL         = "img/header-slides"    # path to image in static dir (for static pages)

  # highlighting 
  highlightjs              = true

  # latex
  katex                    = true

  # links
  email                    = "you@email.com"
  github                   = "//github.com/you"
  linkedin                 = "//linkedin.com/in/you"
  facebook                 = "//facebook.com/you"
  googleplus               = "//google.com/you"
  twitter                  = "//twitter.com/you" 
  px500                    = "//px500"
  instagram                = "//instagram.com/you"
  include_rss              = true                          # include RSS <link> tag in <head> and show RSS icon

  # analytics
  googleAnalytics          = "your-google-analytic-id"
jasonlenjos commented 5 years ago

copy this to your root's config.toml

baseURL                   = "https://example.com"
builddrafts                = false
languageCode               = "zn-Hans"
canonifyurls               = true
contentdir                 = "content"
layoutdir                  = "layouts"
publishdir                 = "public"
enableEmoji                = true
hasCJKLanguage             = true
summaryLength              = 200
Paginate                   = 3

theme                      = "AllinOne"
title                      = "Orianna"

pygmentsuseclasses         = true

[permalinks]
  blog                     = "blog/:year-:month/:slug/"

[taxonomies]
  tag                      = "tags"
  series                   = "series"
  category                 = "categories"

[menu]
  [[menu.main]]
    name                   = "Blog"
    weight                 = -120
    identifier             = "blog"
    url                    = "blog/"  

  [[menu.main]]
    name                   = "Moment"
    weight                 = -110
    identifier             = "moment"
    url                    = "moment/" 

  [[menu.main]]
    name                   = "About"
    weight                 = -100
    identifier             = "about"
    url                    = "about/"  

[params]
  faviconfile              = "img/zheng.png"               # from static/
  avatar                   = "img/profile.jpg"             # path to image in static dir e.g img/avatar.png 
  author                   = "Orianna"
  description              = ["Be myself.", "Love the wonderful world.", "Do the right things and be a better man."]           # appears in the site header when set to a non-empty string
  welcome_head             = "Hello, World!"
  welcome_word             = "~ No Day But Today ~"

  latestpostscount         = 5                             # how many posts to display on the home page
  bloggroupby              = 'month'
  dateform                 = "Jan 2, 2006"
  dateformfull             = "2006-01-02  Monday  15:04:05"
  noshowreadtime           = false                         # if true, don't show "<x> minutes read" in posts

  # slides
  slidesDirPath            = "themes/AllinOne/static/img/header-slides"    # path to image in local dir (path for hugo)
  slidesDirPathURL         = "img/header-slides"    # path to image in static dir (for static pages)

  # highlighting 
  highlightjs              = true

  # latex
  katex                    = true

  # links
  email                    = "you@email.com"
  github                   = "//github.com/you"
  linkedin                 = "//linkedin.com/in/you"
  facebook                 = "//facebook.com/you"
  googleplus               = "//google.com/you"
  twitter                  = "//twitter.com/you" 
  px500                    = "//px500"
  instagram                = "//instagram.com/you"
  include_rss              = true                          # include RSS <link> tag in <head> and show RSS icon

  # analytics
  googleAnalytics          = "your-google-analytic-id"

i met same problem, it does not work, have you fixed it?

devcui commented 5 years ago

c

copy this to your root's config.toml

baseURL                   = "https://example.com"
builddrafts                = false
languageCode               = "zn-Hans"
canonifyurls               = true
contentdir                 = "content"
layoutdir                  = "layouts"
publishdir                 = "public"
enableEmoji                = true
hasCJKLanguage             = true
summaryLength              = 200
Paginate                   = 3

theme                      = "AllinOne"
title                      = "Orianna"

pygmentsuseclasses         = true

[permalinks]
  blog                     = "blog/:year-:month/:slug/"

[taxonomies]
  tag                      = "tags"
  series                   = "series"
  category                 = "categories"

[menu]
  [[menu.main]]
    name                   = "Blog"
    weight                 = -120
    identifier             = "blog"
    url                    = "blog/"  

  [[menu.main]]
    name                   = "Moment"
    weight                 = -110
    identifier             = "moment"
    url                    = "moment/" 

  [[menu.main]]
    name                   = "About"
    weight                 = -100
    identifier             = "about"
    url                    = "about/"  

[params]
  faviconfile              = "img/zheng.png"               # from static/
  avatar                   = "img/profile.jpg"             # path to image in static dir e.g img/avatar.png 
  author                   = "Orianna"
  description              = ["Be myself.", "Love the wonderful world.", "Do the right things and be a better man."]           # appears in the site header when set to a non-empty string
  welcome_head             = "Hello, World!"
  welcome_word             = "~ No Day But Today ~"

  latestpostscount         = 5                             # how many posts to display on the home page
  bloggroupby              = 'month'
  dateform                 = "Jan 2, 2006"
  dateformfull             = "2006-01-02  Monday  15:04:05"
  noshowreadtime           = false                         # if true, don't show "<x> minutes read" in posts

  # slides
  slidesDirPath            = "themes/AllinOne/static/img/header-slides"    # path to image in local dir (path for hugo)
  slidesDirPathURL         = "img/header-slides"    # path to image in static dir (for static pages)

  # highlighting 
  highlightjs              = true

  # latex
  katex                    = true

  # links
  email                    = "you@email.com"
  github                   = "//github.com/you"
  linkedin                 = "//linkedin.com/in/you"
  facebook                 = "//facebook.com/you"
  googleplus               = "//google.com/you"
  twitter                  = "//twitter.com/you" 
  px500                    = "//px500"
  instagram                = "//instagram.com/you"
  include_rss              = true                          # include RSS <link> tag in <head> and show RSS icon

  # analytics
  googleAnalytics          = "your-google-analytic-id"

i met same problem, it does not work, have you fixed it?

copy project/themes/AllinOne/theme.toml to project root and try it again

jasonlenjos commented 5 years ago

same problem, it does not work, have you fixed it?

copy project/themes/AllinOne/theme.toml to project root and try it again

yeah,it works but it lose css/js which locates in static diretory; i just think the site demo of Hugo is not suitble for this theme i'll use the structure of 'exampleSite' to build the site

devcui commented 5 years ago

same problem, it does not work, have you fixed it? copy project/themes/AllinOne/theme.toml to project root and try it again

yeah,it works but it lose css/js which locates in static diretory; i just think the site demo of Hugo is not suitble for this theme i'll use the structure of 'exampleSite' to build the site

you can look this project https://github.com/ferried/hugo-blog