>From 242005b92961edda7d2d3bf8667f5ec75d405b24 Mon Sep 17 00:00:00 2001
From: Amir <amir@localhost.localdomain>
Date: Mon, 5 Oct 2015 13:32:05 +0300
Subject: [PATCH 2/2] Add 'current' link to /docs/ version list

related msgids:

Use of the /docs/current web endpoint isn't common, at least partially
because the website has almost no links to it. This lures users into
naming a specific version when linking to current documentation,
which (I assume) has negative effects on SEO. If users habitually
linked to /docs/current, we'd expect search results to feature
it more whater the current docs are more prominently, which is
what users are usually interested in. We'll see.

Top 3 hits on google for various search queries, as of Oct 2015:

postgres wal_level:

PostgreSQL: Documentation: 9.3: Write Ahead Log
PostgreSQL: Documentation: 9.1: Write Ahead Log
PostgreSQL: Documentation: 9.0: Write Ahead Log
Hot Standby - PostgreSQL wiki

postgres log shipping :

PostgreSQL: Documentation: 9.0: Log-Shipping Standby Servers
PostgreSQL: Documentation: 9.1: Log-Shipping Standby Servers
PostgreSQL: Documentation: 9.4: Log-Shipping Standby Servers
PostgreSQL: Documentation: 9.1: Alternative Method for Log Shipping

postgres warm standby:

Warm Standby Servers for High Availability - PostgreSQL (8.2)
Warm Standby - PostgreSQL wiki
PostgreSQL: Documentation: 9.3: Log-Shipping Standby Servers
PostgreSQL: Documentation: 9.0: Log-Shipping Standby Servers

There have been several threads initiated about this and postgres
SEO in general:

http://www.postgresql.org/message-id/560614CA.1080304@mail.com
http://www.postgresql.org/message-id/04E4F5A6-6526-4DDC-A9E5-2991E3B2ED83@cantoute.com
http://www.postgresql.org/message-id/CA+OCxoyib65Xx3sG3u=SmkNY7zxacNDVSvDYEowh2ptPxA_wAw@mail.gmail.com
---
 templates/docs/docspage.html | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/templates/docs/docspage.html b/templates/docs/docspage.html
index b8eb2a2..ce00dd7 100644
--- a/templates/docs/docspage.html
+++ b/templates/docs/docspage.html
@@ -41,10 +41,19 @@ This page in other versions:
 {%if supported_versions%}
 {%for ver in supported_versions %}
 	{%if not forloop.first %}/{%endif%}
-	{%if ver.version == page.version %}
-	<b>{{ver.display_version}}</b>
+	{%if ver.version.current %}
+		{%if ver.version == page.version %}
+		current ({{ver.display_version}})
+		{%else%}
+		<a href="/docs/current/{{doc_type}}/{{ver.file}}" title="This page in version {{ver.display_version}}">current</a>
+		(<a href="/docs/{{ver.display_version}}/{{doc_type}}/{{ver.file}}" title="This page in current version">{{ver.display_version}}</a>)
+		{%endif%}
 	{%else%}
-	<a href="/docs/{{ver.display_version}}/{{doc_type}}/{{ver.file}}" title="This page in version {{ver.display_version}}">{{ver.display_version}}</a>
+		{%if ver.version == page.version %}
+		<b>{{ver.display_version}}</b>
+		{%else%}
+		<a href="/docs/{{ver.display_version}}/{{doc_type}}/{{ver.file}}" title="This page in version {{ver.display_version}}">{{ver.display_version}}</a>
+		{%endif%}
 	{%endif%}
 {%endfor%}
 {%endif%}
-- 
2.4.3

