From c24d3cb0fd0bc31d83b35a05abe1a6da3074e267 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Wed, 9 Nov 2016 12:00:00 -0500
Subject: [PATCH] Add canonical URL link to documentation pages

By adding a <link rel="canonical"> to the documentation pages that
point to the "current" version, search engines will be encouraged to
return the current documentation in search results instead of a random
old version.
---
 templates/docs/docspage.html | 1 +
 1 file changed, 1 insertion(+)

diff --git a/templates/docs/docspage.html b/templates/docs/docspage.html
index 9f422be..0800e80 100644
--- a/templates/docs/docspage.html
+++ b/templates/docs/docspage.html
@@ -2,6 +2,7 @@
 <html xmlns="https://www.w3.org/1999/xhtml" lang="en" xml:lang="en" dir="ltr">
 <head>
     <title>PostgreSQL: Documentation: {{page.display_version}}: {{page.title}}</title>
+    <link rel="canonical" href="https://www.postgresql.org/docs/current/static/{{page.file}}"/>
     <style type="text/css" media="screen" title="Normal Text">@import url("/dyncss/docs.css?{{gitrev}}");</style>
     <script type="text/javascript" src="/media/js/monospacefix.js?{{gitrev}}"></script>
     <script type="text/javascript">
-- 
2.10.2

