Skip to content

docs: fix not found pages and version fallback

Warren Gifford requested to merge docs/fix-not-found-and-version-fallback into main

Created by: bobheadxi

All not-found pages and missing version pages has thrown a template error a la template error: template: root:3:28: executing "seo" at <.Content.Doc.Title>: nil pointer evaluating *docsite.ContentPage.Doc since https://github.com/sourcegraph/sourcegraph/pull/25460 . This PR adds more safety checks around the template so that if we land on an empty page we don't attempt a nil dereference and error out. This should fix not-found pages (see below) and missing version fallbacks (which I will test when live)

image

Closes https://github.com/sourcegraph/docsite/issues/81 (this is not a docsite issue but a template issue)

Merge request reports

Loading