fix(docs): upgrade Docsy to v0.12.0 to render mermaid diagrams#3541
fix(docs): upgrade Docsy to v0.12.0 to render mermaid diagrams#3541twishabansal wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a local override for Docsy's mermaid.html script to use Hugo's try keyword, resolving compatibility issues with Hugo >= 0.141.0, and updates hugo.toml to specify Mermaid version 11.16.0. The review feedback correctly points out that the try function in Hugo templates always returns a truthy TryResult struct, making the outer else block unreachable, and provides a code suggestion to simplify the error handling.
|
🧨 Preview deployments removed. Cloudflare Pages environments for |
Docsy v0.11.0's scripts/mermaid.html uses Resource.Err, removed in Hugo 0.141.0 and replaced by the try keyword. The repo builds with Hugo >= 0.146, so any page with a mermaid block fails the build. Docsy v0.12.0 switched the partial to try, so bump to it. Also pin the mermaid version.
1d9e3a5 to
b19b43e
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates the Hugo documentation dependencies, upgrading the Docsy theme (github.com/google/docsy) from v0.11.0 to v0.12.0 and updating the corresponding checksums in go.sum. Additionally, it configures Mermaid diagram support in hugo.toml by specifying version 11.16.0. There are no review comments, and I have no feedback to provide as the changes are straightforward dependency and configuration updates.
|
🚀 Cloudflare Preview Ready! 🔎 View Preview: https://pr-3541.toolbox-docs-6xc.pages.dev (Note: Subsequent pushes to this PR will automatically update the preview at this same URL) |
Problem
Docsy v0.11.0's
mermaid.htmlpartial callsResource.Err, which Hugo removed in 0.141.0. This repo builds with Hugo >= 0.146, so any page containing a mermaid block fails the build. No page uses mermaid today, so the break is latent.Fix
11.16.0inhugo.toml.Verified locally: the site builds and a mermaid block renders. Unblocks upcoming docs that include mermaid diagrams.