jgazeau / shadocs

Shadocs Theme for Hugo
https://jgazeau.github.io/shadocs/
MIT License
51 stars 20 forks source link

[bug]: hugo server error #169

Closed 9201314 closed 1 year ago

9201314 commented 1 year ago

Steps that lead to the issue

  1. I build a new site with hugo new site xxx
  2. Then I follow the doc
    cd ${PROJECT_DIRECTORY}
    git submodule add https://github.com/jgazeau/shadocs.git themes/shadocs
    git submodule update --init --recursive
  3. Next I use themes\shadocs\exampleSite\config.toml as site config
  4. Finally run hugo server error image

Expected behavior

I don't konw what's wrong? How to solve these problems? Please help me. Thank you!

Reproducer

hugo.exe server Start building sites … hugo v0.111.3-5d4eb5154e1fed125ca8e9b5a0315c4180dab192+extended windows/amd64 BuildDate=2023-03-12T11:40:50Z VendorInfo=gohugoio ERROR 2023/04/21 17:01:50 render of "taxonomy" failed: "E:\web\c\themes\shadocs\layouts_default\terms.html:1:4": execute of template failed: template: _default/terms.html:1:4: executing "_default/terms.html" at <partial "main.html" (dict "root" . "contentTemplate" "theme/terms-content.html")>: error calling partial: "E:\web\c\themes\shadocs\layouts\partials\main.html:5:8": execute of template failed: template: partials/main.html:5:8: executing "partials/main.html" at <partial "theme/includes-head.html" .root>: error calling partial: "E:\web\c\themes\shadocs\layouts\partials\theme\includes-head.html:68:36": execute of template failed: template: partials/theme/includes-head.html:68:36: executing "includeSass" at <append (resources.Get .)>: error calling append: reflect: call of reflect.Value.Type on zero Value ERROR 2023/04/21 17:01:50 render of "home" failed: "E:\web\c\themes\shadocs\layouts_default\index.html:1:4": execute of template failed: template: _default/index.html:1:4: executing "_default/index.html" at <partial "main.html" (dict "root" . "contentTemplate" "theme/content.html")>: error calling partial: "E:\web\c\themes\shadocs\layouts\partials\main.html:5:8": execute of template failed: template: partials/main.html:5:8: executing "partials/main.html" at <partial "theme/includes-head.html" .root>: error calling partial: "E:\web\c\themes\shadocs\layouts\partials\theme\includes-head.html:68:36": execute of template failed: template: partials/theme/includes-head.html:68:36: executing "includeSass" at <append (resources.Get .)>: error calling append: reflect: call of reflect.Value.Type on zero Value Error: Error building site: failed to render pages: render of "taxonomy" failed: "E:\web\c\themes\shadocs\layouts_default\terms.html:1:4": execute of template failed: template: _default/terms.html:1:4: executing "_default/terms.html" at <partial "main.html" (dict "root" . "contentTemplate" "theme/terms-content.html")>: error calling partial: "E:\web\c\themes\shadocs\layouts\partials\main.html:5:8": execute of template failed: template: partials/main.html:5:8: executing "partials/main.html" at <partial "theme/includes-head.html" .root>: error calling partial: "E:\web\c\themes\shadocs\layouts\partials\theme\includes-head.html:68:36": execute of template failed: template: partials/theme/includes-head.html:68:36: executing "includeSass" at <append (resources.Get .)>: error calling append: reflect: call of reflect.Value.Type on zero Value Built in 28 ms

Solution?

No response

jgazeau commented 1 year ago

Hi @9201314 ,

Sorry for the delay, Actually if you reuse the config.toml from the exampleSite you will have to delete the params.includes section to make it work. This section is used to declare the resource files to include during the build, which in your case doesn't exists. After that it will work. But I also invite you to check the other parameters. They might not all be useful in your case.

9201314 commented 1 year ago

Hi @9201314 ,

Sorry for the delay, Actually if you reuse the config.toml from the exampleSite you will have to delete the params.includes section to make it work. This section is used to declare the resource files to include during the build, which in your case doesn't exists. After that it will work. But I also invite you to check the other parameters. They might not all be useful in your case.

Thank you for your reply.It's very useful.