all repos — searchix @ 5febc847935ea032eec67ab2a1304730815237a8

Search engine for NixOS, nix-darwin, home-manager and NUR users

feat: add canonical links to results and details pages

Alin
commit

5febc847935ea032eec67ab2a1304730815237a8

parent

9ab1a44e0a60fad5c01bc1b1a9521e40c4151cc6

1 file changed, 6 insertions(+), 0 deletions(-)

changed files
M internal/components/page.gointernal/components/page.go
@@ -58,6 +58,12 @@ TitleAttr("Searchix "+source.String()),
Href(joinPath("/", source.Importer.String(), source.Key, "opensearch.xml")), ) }), + g.Iff(tdata.CanonicalURL != "", func() g.Node { + return Link( + Rel("canonical"), + Href(tdata.CanonicalURL), + ) + }), ), Body( Header(