docsy-example icon indicating copy to clipboard operation
docsy-example copied to clipboard

Hugo Server Error

Open grupodeca opened this issue 6 months ago • 1 comments

Hi,

I followed the instructions from docsy site but it failed:

# git clone --depth 1 --branch v0.11.0 https://github.com/google/docsy-example.git docsy

# cd docsy

# hugo server
Error: html/template:_markup/render-heading.html:1:12: no such template "_default/_markup/td-render-heading.html"

# hugo version
hugo v0.147.4+extended+withdeploy darwin/amd64 BuildDate=2025-05-20T10:41:19Z VendorInfo=brew

# uname -a
Darwin macOS.local 24.5.0 Darwin Kernel Version 24.5.0: Tue Apr 22 19:54:33 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T8122 arm64

# node -v
v22.16.0

# npm -v
10.9.2

# npm list --depth=0
gerard@ /Users/gerard
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

URL: https://www.docsy.dev/docs/get-started/docsy-as-module/example-site-as-template/

Regards

grupodeca avatar May 21 '25 22:05 grupodeca

Your problems are related to the hugo version you are using. Latest hugo version 0.147.4 does not work with docsy version v0.11.0 that you cloned.

You have several options:

  • Instead of hugo server, run

    npm run _serve
    

    This will use hugo extended version 0.136.2 which comes bundled with docsy version v0.11.0.

  • Clone the development version repository of the repo which will successfully run with latest hugo version 0.147.4

    git clone --depth 1 https://github.com/google/docsy-example.git docsy
    
  • Locally install and use hugo version 0.145.0 which is compatible with docsy version v0.11.0. If you want to switch back and forth between hugo versions easily, you should have a look at very convenient Hugo Version Manager which I can highly recommend.

Hope that helps, the choice is yours! I would probably go with option 1 which needs no additional action at all, just issueing the npm run _serve command.

deining avatar May 22 '25 07:05 deining

Version 0.12.0 is out for quite some time. When using this version, everything should run smoothly. Therefore closing this issue now.

deining avatar Aug 05 '25 06:08 deining