google / docsy-example

An example documentation site using the Docsy Hugo theme
https://docsy.dev
Apache License 2.0
469 stars 686 forks source link

Getting Started - example won't build with hugo version 0.68.3 #97

Closed joelhoisko closed 3 years ago

joelhoisko commented 3 years ago

Env:

Ubuntu 20.04
Hugo v.0.68.3/extended
Node v14.3.0

Hi! I followed the tutorial>

  1. Installed autoprefixer and postcss-cli (who do you need sudo here btw?)
  2. Cloned the Docsy example site
  3. Updated the submodules.

But when I run hugo server I get these errors instead:

Building sites … ERROR 2020/12/21 21:55:47 render of "section" failed: execute of template failed: template: blog/section.print.html:2:3: executing "main" at <partial "print/render" .>: error calling partial: execute of template failed: template: partials/print/render.html:10:4: executing "recurse-toc" at <partial "print/toc-li.html" (dict "sid" $sid "Page" .)>: error calling partial: "/home/joel/Dolittle/docsy-example/themes/docsy/layouts/partials/print/toc-li.html:3:5": execute of template failed: template: partials/print/toc-li.html:3:5: executing "partials/print/toc-li.html" at <partial $tpl .>: error calling partial: partial "/print/toc-li-blog.html" not found
Built in 827 ms
Error: Error building site: failed to render pages: render of "section" failed: execute of template failed: template: blog/section.print.html:2:3: executing "main" at <partial "print/render" .>: error calling partial: execute of template failed: template: partials/print/render.html:10:4: executing "recurse-toc" at <partial "print/toc-li.html" (dict "sid" $sid "Page" .)>: error calling partial: "/home/joel/Dolittle/docsy-example/themes/docsy/layouts/partials/print/toc-li.html:3:5": execute of template failed: template: partials/print/toc-li.html:3:5: executing "partials/print/toc-li.html" at <partial $tpl .>: error calling partial: partial "/print/toc-li-blog.html" not found

Looking into themse/docsy/layouts/partials/print does show that the toc-li-blog.html exists so not quite sure what happening here.

After upgrading to the latest Hugo v0.79.1 extended I got it working, not quite sure what's the tipping point version but it clearly should be higher than v0.52 like the docs say.

LisaFC commented 3 years ago

Yes, I think we need to update the docs, thanks for spotting that - the print feature depends on a more recent version and I just need to check when it was added!

LisaFC commented 3 years ago

0.75.0 is the minimum version for the print feature to work so I'll update the docs.

gwatts commented 3 years ago

Actually it should work with older versions than that as of commit https://github.com/google/docsy/commit/2c411821dbd206821fb586f6ab75cae1302c1f99 - can't recall how far back i tested though

LisaFC commented 3 years ago

Probably best to recommend users go for 0.75.0 or later if they're installing for the first time, though, unless there's a good reason for having an older version? Thoughts?