public inbox for [email protected]
help / color / mirror / Atom feed[PATCH] Cross-version navigation in documentation
14+ messages / 7 participants
[nested] [flat]
* [PATCH] Cross-version navigation in documentation
@ 2012-05-27 18:06 Marti Raudsepp <[email protected]>
0 siblings, 1 reply; 14+ messages in thread
From: Marti Raudsepp @ 2012-05-27 18:06 UTC (permalink / raw)
To: pgsql-www; +Cc: Andres Freund <[email protected]>; Stefan Kaltenbrunner <[email protected]>
Hi list,
It always bothers me that Google links to version-specific PostgreSQL
documentation pages, usually an obsolete version. This patch lets you
easily navigate to the version you want by adding a new line at the
top:
This page in other versions: 9.2 / 9.1 / 9.0 / 8.4 / 8.3 / 8.2 / 8.1 /
8.0 / 7.4 / 7.3 / 7.2 / devel
The same page in different versions is assumed to have the same file
name. No effort is done to track pages which have been
removed/added/split/renamed -- I think that would be lots of
complexity for little gain. For example, The 7.4 version contains 644
doc pages, and only 68 of those (~10%) aren't present in 9.2. In
actual relevant versions, the overlap is much greater.
I also noticed that the docs table isn't currently indexed at all.
docs/models.py now defines a new index/unique constraint, which
requires manual migration:
alter table docs add unique (file, version);
PS: Python projects have a nearly universal style of using 4-space
indents (PEP-0008). I understand that PostgreSQL itself uses tabs, but
maybe a change is warranted here, since Python is particularly picky
about indentation?
----
Attached are two patches:
0001-Allow-documentation-loading-without-tidy-Tidylib-for.patch
Just a simple fallback so docs can be imported without µTidylib --
which is not packaged for Arch Linux
0002-Add-basic-version-navigation-support-for-documentati.patch
Actual implementation of cross-version navigation
Also available from my github fork: https://github.com/intgr/pgweb
Regards,
Marti
Attachments:
[application/octet-stream] 0001-Allow-documentation-loading-without-tidy-Tidylib-for.patch (1.4K, 2-0001-Allow-documentation-loading-without-tidy-Tidylib-for.patch)
download | inline diff:
From 1eca1859a9cc41b2cdf890c7b236752aff7811a3 Mon Sep 17 00:00:00 2001
From: Marti Raudsepp <[email protected]>
Date: Sat, 26 May 2012 03:25:46 +0300
Subject: [PATCH 1/2] =?UTF-8?q?Allow=20documentation=20loading=20without=20t?=
=?UTF-8?q?idy=20(=C2=B5Tidylib)=20for=20development?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
tools/docs/docload.py | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/tools/docs/docload.py b/tools/docs/docload.py
index c88df7e..e1c0ec4 100755
--- a/tools/docs/docload.py
+++ b/tools/docs/docload.py
@@ -6,7 +6,11 @@ import sys
import os
import tarfile
import re
-import tidy
+try:
+ import tidy
+except ImportError, err:
+ print>>sys.stderr, "WARNING: cannot import tidy: %s" % err
+ tidy = None
from optparse import OptionParser
@@ -43,12 +47,16 @@ def load_doc_file(filename, f):
title = ""
if not quiet: print "--- file: %s (%s) ---" % (filename, title)
- s = tidy.parseString(contents.encode('utf-8'), **tidyopts)
+ if tidy:
+ s = str(tidy.parseString(contents.encode('utf-8'), **tidyopts))
+ else:
+ s = contents
+
curs.execute("INSERT INTO docs (file, version, title, content) VALUES (%(f)s, %(v)s, %(t)s, %(c)s)",{
'f': filename,
'v': ver,
't': title,
- 'c': str(s),
+ 'c': s,
})
global pagecount
pagecount += 1
--
1.7.10.2
[application/octet-stream] 0002-Add-basic-version-navigation-support-for-documentati.patch (5.4K, 3-0002-Add-basic-version-navigation-support-for-documentati.patch)
download | inline diff:
From baaef6860f6ef950d8fce0e346d4f922aba0fb91 Mon Sep 17 00:00:00 2001
From: Marti Raudsepp <[email protected]>
Date: Sat, 26 May 2012 03:29:02 +0300
Subject: [PATCH 2/2] Add basic version navigation support for documentation
Also refactored "devel" version display logic into
DocPage.display_version function.
Requires database modification:
alter table docs add unique (file, version);
---
media/css/docs.css | 2 +-
pgweb/docs/models.py | 9 +++++++++
pgweb/docs/views.py | 8 +++++---
templates/docs/docspage.html | 17 ++++++++++++++---
4 files changed, 29 insertions(+), 7 deletions(-)
diff --git a/media/css/docs.css b/media/css/docs.css
index 24857b0..3b272f6 100644
--- a/media/css/docs.css
+++ b/media/css/docs.css
@@ -51,7 +51,7 @@ div.NAVHEADER table {
padding-bottom: 2px;
}
-#docNav {
+#docNav, #docVersions {
position: relative;
text-align: left;
margin-left: 10px;
diff --git a/pgweb/docs/models.py b/pgweb/docs/models.py
index 4aafde4..5ea1497 100644
--- a/pgweb/docs/models.py
+++ b/pgweb/docs/models.py
@@ -12,8 +12,17 @@ class DocPage(models.Model):
title = models.CharField(max_length=256, null=True, blank=True)
content = models.TextField(null=True, blank=True)
+ def display_version(self):
+ """Version as used for displaying and in URLs"""
+ if self.version == 0:
+ return 'devel'
+ else:
+ return str(self.version)
+
class Meta:
db_table = 'docs'
+ # Index file first, because we want to list versions by file
+ unique_together = [('file', 'version')]
class DocComment(PgModel, models.Model):
version = models.DecimalField(max_digits=3, decimal_places=1, null=False)
diff --git a/pgweb/docs/views.py b/pgweb/docs/views.py
index d5969a8..aaafd1d 100644
--- a/pgweb/docs/views.py
+++ b/pgweb/docs/views.py
@@ -41,17 +41,19 @@ def docpage(request, version, typ, filename):
else:
indexname = "index.html"
- page = get_object_or_404(DocPage, version=ver, file="%s.%s" % (filename, extension))
+ fullname = "%s.%s" % (filename, extension)
+ page = get_object_or_404(DocPage, version=ver, file=fullname)
+ versions = DocPage.objects.filter(file=fullname).order_by('-version').only('version', 'file')
if typ=="interactive":
- comments = DocComment.objects.filter(version=ver, file="%s.%s" % (filename, extension), approved=True).order_by('posted_at')
+ comments = DocComment.objects.filter(version=ver, file=fullname, approved=True).order_by('posted_at')
else:
comments = None
return render_to_response('docs/docspage.html', {
'page': page,
+ 'versions': versions,
'title': page.title,
- 'doc_nav_version': ver > 0 and ver or "devel",
'doc_type': typ,
'comments': comments,
'can_comment': (typ=="interactive" and ver==currver),
diff --git a/templates/docs/docspage.html b/templates/docs/docspage.html
index d68dafe..2727562 100644
--- a/templates/docs/docspage.html
+++ b/templates/docs/docspage.html
@@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" dir="ltr">
<head>
- <title>PostgreSQL: Documentation: {{doc_nav_version}}: {{page.title}}</title>
+ <title>PostgreSQL: Documentation: {{page.display_version}}: {{page.title}}</title>
<style type="text/css" media="screen" title="Normal Text">@import url("/media/css/docs.css");</style>
<link rel="alternate stylesheet" media="screen" href="/media/css/docs_large.css" type="text/css" title="Large Text" />
<script type="text/javascript" src="/media/js/styleswitcher.js"></script>
@@ -30,14 +30,25 @@
<div id="docSearch">
<form action="/search/" method="get">
<div>
- <input type="hidden" name="u" value="/docs/{{doc_nav_version}}/">
+ <input type="hidden" name="u" value="/docs/{{page.display_version}}/">
<label for="q">Search Documentation: </label><input type="text" id="q" name="q" size="20" onfocus="if( this.value==this.defaultValue ) this.value='';" value="Search" /><input id="submit" type="submit" value="Search" />
</div>
</form>
<div id="docTextSize">Text Size: <a href="#" onclick="setActiveStyleSheet('Normal Text'); return false;" onkeypress="return false;" title="Normal Text Size">Normal</a> / <a href="#" onclick="setActiveStyleSheet('Large Text'); return false;" onkeypress="return false;" title="Large Text Size">Large</a></div>
</div>
<div id="docNav">
-<a href="/" title="Home">Home</a> → <a href="/docs" title="Documentation">Documentation</a> → <a href="/docs/manuals" title="Manuals">Manuals</a> → <a href="/docs/{{doc_nav_version}}/{{doc_type}}/{{doc_index_filename}}">PostgreSQL {{doc_nav_version}}</a>{%if loaddate%} ({{loaddate|date:"Y-m-d H:i:s"}}){%endif%}
+<a href="/" title="Home">Home</a> → <a href="/docs" title="Documentation">Documentation</a> → <a href="/docs/manuals" title="Manuals">Manuals</a> → <a href="/docs/{{page.display_version}}/{{doc_type}}/{{doc_index_filename}}">PostgreSQL {{page.display_version}}</a>{%if loaddate%} ({{loaddate|date:"Y-m-d H:i:s"}}){%endif%}
+</div>
+<div id="docVersions">
+This page in other versions:
+{% for ver in versions %}
+ {% if not forloop.first %}/{% endif %}
+ {% 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 %}
+{% endfor %}
</div>
</div>
--
1.7.10.2
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: [PATCH] Cross-version navigation in documentation
@ 2012-05-27 18:40 Magnus Hagander <[email protected]>
parent: Marti Raudsepp <[email protected]>
0 siblings, 1 reply; 14+ messages in thread
From: Magnus Hagander @ 2012-05-27 18:40 UTC (permalink / raw)
To: Marti Raudsepp <[email protected]>; +Cc: pgsql-www; Andres Freund <[email protected]>; Stefan Kaltenbrunner <[email protected]>
On Sunday, May 27, 2012, Marti Raudsepp wrote:
> Hi list,
>
> It always bothers me that Google links to version-specific PostgreSQL
> documentation pages, usually an obsolete version. This patch lets you
> easily navigate to the version you want by adding a new line at the
> top:
>
> This page in other versions: 9.2 / 9.1 / 9.0 / 8.4 / 8.3 / 8.2 / 8.1 /
> 8.0 / 7.4 / 7.3 / 7.2 / devel
>
> The same page in different versions is assumed to have the same file
> name. No effort is done to track pages which have been
> removed/added/split/renamed -- I think that would be lots of
> complexity for little gain. For example, The 7.4 version contains 644
> doc pages, and only 68 of those (~10%) aren't present in 9.2. In
> actual relevant versions, the overlap is much greater.
>
Pretty sure this was discussed before, and rejected then as not being what
we wanted due to the lack of tracking cross-version changes (if it was just
the links, it could've been done a long time ago..)
It might wel be worth reopening that discussion though. I think the
important part is not missing pages - it's pages that contain the same
information but have been renamed (because the section was renamed). E.g.
it's not a problem that there is no mapping for pg_basebackup in versions
prior to 9.1 - because it simply did not exist.
So I'd invite those who were critical the last time to re-hash their
arguments...
I also noticed that the docs table isn't currently indexed at all.
> docs/models.py now defines a new index/unique constraint, which
> requires manual migration:
> alter table docs add unique (file, version);
>
There was an index around, but it wasn't reflected in the python code so it
wouldn't be regenerated. Artifact of the migration. So that should
obviously be fixed.
> PS: Python projects have a nearly universal style of using 4-space
> indents (PEP-0008). I understand that PostgreSQL itself uses tabs, but
> maybe a change is warranted here, since Python is particularly picky
> about indentation?
>
I don't really see the point. If your editor can't be consistent about
tabs/spaces, you probably have a bigger problem, particularly when dealing
with python ;) If it was done from scratch, maybe that would've been a
better idea, but I don't see the point of changing it after the fact.
----
> Attached are two patches:
>
> 0001-Allow-documentation-loading-without-tidy-Tidylib-for.patch
> Just a simple fallback so docs can be imported without µTidylib --
> which is not packaged for Arch Linux
>
This I don't like at all. Maybe you should switch to a distro that includes
some basic packages? ;)
More to the point though - if we want a feature like that, it should be
controlled by a parameter that turns it off, not by automatically doing it.
These scripts are run as part of larger load operations, and a warning
might easily be missed - and if something actually goes wrong with the tidy
install on those boxes, we *want* it to be an error.
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: [PATCH] Cross-version navigation in documentation
@ 2012-05-28 11:44 Andres Freund <[email protected]>
parent: Magnus Hagander <[email protected]>
0 siblings, 1 reply; 14+ messages in thread
From: Andres Freund @ 2012-05-28 11:44 UTC (permalink / raw)
To: Magnus Hagander <[email protected]>; +Cc: Marti Raudsepp <[email protected]>; pgsql-www; Stefan Kaltenbrunner <[email protected]>
Hi All,
On Sunday, May 27, 2012 08:40:57 PM Magnus Hagander wrote:
> On Sunday, May 27, 2012, Marti Raudsepp wrote:
> > Hi list,
> >
> > It always bothers me that Google links to version-specific PostgreSQL
> > documentation pages, usually an obsolete version. This patch lets you
> > easily navigate to the version you want by adding a new line at the
> > top:
> >
> > This page in other versions: 9.2 / 9.1 / 9.0 / 8.4 / 8.3 / 8.2 / 8.1 /
> > 8.0 / 7.4 / 7.3 / 7.2 / devel
> >
> > The same page in different versions is assumed to have the same file
> > name. No effort is done to track pages which have been
> > removed/added/split/renamed -- I think that would be lots of
> > complexity for little gain. For example, The 7.4 version contains 644
> > doc pages, and only 68 of those (~10%) aren't present in 9.2. In
> > actual relevant versions, the overlap is much greater.
>
> Pretty sure this was discussed before, and rejected then as not being what
> we wanted due to the lack of tracking cross-version changes (if it was just
> the links, it could've been done a long time ago..)
>
> It might wel be worth reopening that discussion though. I think the
> important part is not missing pages - it's pages that contain the same
> information but have been renamed (because the section was renamed). E.g.
> it's not a problem that there is no mapping for pg_basebackup in versions
> prior to 9.1 - because it simply did not exist.
The amount of pages actually having been renamed isn't that big. Marti opened
up his version of the docs to me and I browsed along and even between 7.4 and
9.1 I had a hard time finding pages where you would expect a link from 7.4
forwards.
Except very minor cases (e.g. sql-createconstraint.html => sql-
createtrigger.html) the pagenames for the sql commands itself haven't changed
in quite a while now. And imo that and some of the function references is
where you most often want to switch between individual versions because you
want to ensure youre back/forward compatible.
Sure, it won't be totally perfect, but the usability win already is so big in
comparison with trying to change the version in the url all the time that I
don't get why those few corner cases should block the imo large improvment.
If anything pages which changed their meaning but kept the name would be
worrying, but I don't really see that happnening often enough to be relevant.
Greetings,
Andres
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: [PATCH] Cross-version navigation in documentation
@ 2012-05-30 09:58 Marti Raudsepp <[email protected]>
parent: Andres Freund <[email protected]>
0 siblings, 1 reply; 14+ messages in thread
From: Marti Raudsepp @ 2012-05-30 09:58 UTC (permalink / raw)
To: Magnus Hagander <[email protected]>; +Cc: Andres Freund <[email protected]>; pgsql-www; Stefan Kaltenbrunner <[email protected]>
On Mon, May 28, 2012 at 2:44 PM, Andres Freund <[email protected]> wrote:
> The amount of pages actually having been renamed isn't that big. Marti opened
> up his version of the docs to me and I browsed along and even between 7.4 and
> 9.1 I had a hard time finding pages where you would expect a link from 7.4
> forwards.
Exactly. And people rely on page names right now anyway -- they find
the page on Google and then just change the version number in the URL
and see if it works. Either that, or they will read the wrong version.
What I'm proposing solves >95% of the cases and I think that is good
enough.
In theory we could mine git history to extract page
renames/merges/splits, but it sounds like a lot of effort for little
gain.
On Sun, May 27, 2012 at 9:40 PM, Magnus Hagander <[email protected]> wrote:
> On Sunday, May 27, 2012, Marti Raudsepp wrote:
>> PS: Python projects have a nearly universal style of using 4-space
>> indents (PEP-0008).
> I don't really see the point. If your editor can't be consistent about
> tabs/spaces, you probably have a bigger problem
Well I need to reconfigure my editor to edit these files.
>> 0001-Allow-documentation-loading-without-tidy-Tidylib-for.patch
> More to the point though - if we want a feature like that, it should be
> controlled by a parameter that turns it off, not by automatically doing it.
Ok, agreed.
Regards,
Marti
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: [PATCH] Cross-version navigation in documentation
@ 2012-06-05 08:59 Magnus Hagander <[email protected]>
parent: Marti Raudsepp <[email protected]>
0 siblings, 1 reply; 14+ messages in thread
From: Magnus Hagander @ 2012-06-05 08:59 UTC (permalink / raw)
To: Marti Raudsepp <[email protected]>; +Cc: Andres Freund <[email protected]>; pgsql-www; Stefan Kaltenbrunner <[email protected]>
On Wed, May 30, 2012 at 11:58 AM, Marti Raudsepp <[email protected]> wrote:
> On Mon, May 28, 2012 at 2:44 PM, Andres Freund <[email protected]> wrote:
>> The amount of pages actually having been renamed isn't that big. Marti opened
>> up his version of the docs to me and I browsed along and even between 7.4 and
>> 9.1 I had a hard time finding pages where you would expect a link from 7.4
>> forwards.
>
> Exactly. And people rely on page names right now anyway -- they find
> the page on Google and then just change the version number in the URL
> and see if it works. Either that, or they will read the wrong version.
> What I'm proposing solves >95% of the cases and I think that is good
> enough.
Given that nobody has objecte,d I'm going to go ahead and do this.
However - should we perhaps just list supported versions? Turns the query into:
versions = DocPage.objects.filter(file=fullname).extra(where=['version
IN (SELECT tree FROM core_version WHERE
supported)']).order_by('-version').only('version', 'file')
or if we do want to list all versions, we should somehow indicate
which versions are supported and not on this list as well, I think.
But I'm happy to just listed supported versions for now.
Thoughts?
> On Sun, May 27, 2012 at 9:40 PM, Magnus Hagander <[email protected]> wrote:
>> On Sunday, May 27, 2012, Marti Raudsepp wrote:
>>> PS: Python projects have a nearly universal style of using 4-space
>>> indents (PEP-0008).
>
>> I don't really see the point. If your editor can't be consistent about
>> tabs/spaces, you probably have a bigger problem
>
> Well I need to reconfigure my editor to edit these files.
I'm sure you can instruct it to reconfigure itself once you know it
though ;) (based on pathname or such)
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: [PATCH] Cross-version navigation in documentation
@ 2012-06-05 09:42 Andres Freund <[email protected]>
parent: Magnus Hagander <[email protected]>
0 siblings, 1 reply; 14+ messages in thread
From: Andres Freund @ 2012-06-05 09:42 UTC (permalink / raw)
To: Magnus Hagander <[email protected]>; +Cc: Marti Raudsepp <[email protected]>; pgsql-www; Stefan Kaltenbrunner <[email protected]>
On Tuesday, June 05, 2012 10:59:54 AM Magnus Hagander wrote:
> On Wed, May 30, 2012 at 11:58 AM, Marti Raudsepp <[email protected]> wrote:
> > On Mon, May 28, 2012 at 2:44 PM, Andres Freund <[email protected]>
wrote:
> >> The amount of pages actually having been renamed isn't that big. Marti
> >> opened up his version of the docs to me and I browsed along and even
> >> between 7.4 and 9.1 I had a hard time finding pages where you would
> >> expect a link from 7.4 forwards.
> >
> > Exactly. And people rely on page names right now anyway -- they find
> > the page on Google and then just change the version number in the URL
> > and see if it works. Either that, or they will read the wrong version.
> > What I'm proposing solves >95% of the cases and I think that is good
> > enough.
>
> Given that nobody has objecte,d I'm going to go ahead and do this.
Great!
> However - should we perhaps just list supported versions? Turns the query
> into: versions =
> DocPage.objects.filter(file=fullname).extra(where=['version IN (SELECT
> tree FROM core_version WHERE
> supported)']).order_by('-version').only('version', 'file')
>
> or if we do want to list all versions, we should somehow indicate
> which versions are supported and not on this list as well, I think.
> But I'm happy to just listed supported versions for now.
I personally would like to see older versions there because every now and then
I need to look something up for them, but its infrequent enough that I don't
especially care.
Thanks!
Andres
PS: Sorry Magnus, youve got the email twice. I recently reconfigured my mail
client to disassociate reply-all from its previous key combination and I
havent fully retrained myself.
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: [PATCH] Cross-version navigation in documentation
@ 2012-06-05 10:02 Magnus Hagander <[email protected]>
parent: Andres Freund <[email protected]>
0 siblings, 1 reply; 14+ messages in thread
From: Magnus Hagander @ 2012-06-05 10:02 UTC (permalink / raw)
To: Andres Freund <[email protected]>; +Cc: Marti Raudsepp <[email protected]>; pgsql-www; Stefan Kaltenbrunner <[email protected]>
On Tue, Jun 5, 2012 at 11:42 AM, Andres Freund <[email protected]> wrote:
> On Tuesday, June 05, 2012 10:59:54 AM Magnus Hagander wrote:
>> On Wed, May 30, 2012 at 11:58 AM, Marti Raudsepp <[email protected]> wrote:
>> > On Mon, May 28, 2012 at 2:44 PM, Andres Freund <[email protected]>
> wrote:
>> >> The amount of pages actually having been renamed isn't that big. Marti
>> >> opened up his version of the docs to me and I browsed along and even
>> >> between 7.4 and 9.1 I had a hard time finding pages where you would
>> >> expect a link from 7.4 forwards.
>> >
>> > Exactly. And people rely on page names right now anyway -- they find
>> > the page on Google and then just change the version number in the URL
>> > and see if it works. Either that, or they will read the wrong version.
>> > What I'm proposing solves >95% of the cases and I think that is good
>> > enough.
>>
>> Given that nobody has objecte,d I'm going to go ahead and do this.
> Great!
>
>> However - should we perhaps just list supported versions? Turns the query
>> into: versions =
>> DocPage.objects.filter(file=fullname).extra(where=['version IN (SELECT
>> tree FROM core_version WHERE
>> supported)']).order_by('-version').only('version', 'file')
>>
>> or if we do want to list all versions, we should somehow indicate
>> which versions are supported and not on this list as well, I think.
>> But I'm happy to just listed supported versions for now.
> I personally would like to see older versions there because every now and then
> I need to look something up for them, but its infrequent enough that I don't
> especially care.
Well, I'm happy to include those *IF* we add some sort of indication
that they aren't supported. Hmm. maybe just "this page in other
version" and "this page in unsupported versions".
I'll do some experimenting :)
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: [PATCH] Cross-version navigation in documentation
@ 2012-06-06 16:38 Dave Page <[email protected]>
parent: Magnus Hagander <[email protected]>
0 siblings, 1 reply; 14+ messages in thread
From: Dave Page @ 2012-06-06 16:38 UTC (permalink / raw)
To: Magnus Hagander <[email protected]>; +Cc: Andres Freund <[email protected]>; Marti Raudsepp <[email protected]>; pgsql-www; Stefan Kaltenbrunner <[email protected]>
On Tue, Jun 5, 2012 at 11:02 AM, Magnus Hagander <[email protected]> wrote:
>
> Well, I'm happy to include those *IF* we add some sort of indication
> that they aren't supported. Hmm. maybe just "this page in other
> version" and "this page in unsupported versions".
I see this got committed. Unfortunately on Chrome (on Mac) the layout
is a little messed up. Can you fix the alignment please, and maybe add
a blank line between the breadcrumbs and the new text?
Screenshot attached.
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Attachments:
[image/png] Screen Shot 2012-06-06 at 17.35.21.png (28.3K, 2-Screen%20Shot%202012-06-06%20at%2017.35.21.png)
download | view image
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: [PATCH] Cross-version navigation in documentation
@ 2012-06-06 16:49 Marti Raudsepp <[email protected]>
parent: Dave Page <[email protected]>
0 siblings, 1 reply; 14+ messages in thread
From: Marti Raudsepp @ 2012-06-06 16:49 UTC (permalink / raw)
To: Dave Page <[email protected]>; +Cc: Magnus Hagander <[email protected]>; Andres Freund <[email protected]>; pgsql-www; Stefan Kaltenbrunner <[email protected]>
On Wed, Jun 6, 2012 at 7:38 PM, Dave Page <[email protected]> wrote:
> Unfortunately on Chrome (on Mac) the layout
> is a little messed up. Can you fix the alignment please, and maybe add
> a blank line between the breadcrumbs and the new text?
>
> Screenshot attached.
I suspect your browser has cached the old version of the CSS. Does a
refresh solve it?
Regards,
Marti
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: [PATCH] Cross-version navigation in documentation
@ 2012-06-06 16:51 Dave Page <[email protected]>
parent: Marti Raudsepp <[email protected]>
0 siblings, 1 reply; 14+ messages in thread
From: Dave Page @ 2012-06-06 16:51 UTC (permalink / raw)
To: Marti Raudsepp <[email protected]>; +Cc: Magnus Hagander <[email protected]>; Andres Freund <[email protected]>; pgsql-www; Stefan Kaltenbrunner <[email protected]>
On Wed, Jun 6, 2012 at 5:49 PM, Marti Raudsepp <[email protected]> wrote:
> On Wed, Jun 6, 2012 at 7:38 PM, Dave Page <[email protected]> wrote:
>> Unfortunately on Chrome (on Mac) the layout
>> is a little messed up. Can you fix the alignment please, and maybe add
>> a blank line between the breadcrumbs and the new text?
>>
>> Screenshot attached.
>
> I suspect your browser has cached the old version of the CSS. Does a
> refresh solve it?
Yes. It's been a long day :-(.
Thanks!
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: [PATCH] Cross-version navigation in documentation
@ 2012-06-07 00:12 Josh Berkus <[email protected]>
parent: Dave Page <[email protected]>
0 siblings, 2 replies; 14+ messages in thread
From: Josh Berkus @ 2012-06-07 00:12 UTC (permalink / raw)
To: pgsql-www
>> I suspect your browser has cached the old version of the CSS. Does a
>> refresh solve it?
Oh, wow, very nice! That should really help our "Google links to
ancient version of the docs" problem.
--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: [PATCH] Cross-version navigation in documentation
@ 2012-06-07 09:22 Raymond O'Donnell <[email protected]>
parent: Josh Berkus <[email protected]>
1 sibling, 0 replies; 14+ messages in thread
From: Raymond O'Donnell @ 2012-06-07 09:22 UTC (permalink / raw)
To: Josh Berkus <[email protected]>; +Cc: pgsql-www
On 07/06/2012 01:12, Josh Berkus wrote:
>
>>> I suspect your browser has cached the old version of the CSS. Does a
>>> refresh solve it?
>
> Oh, wow, very nice! That should really help our "Google links to
> ancient version of the docs" problem.
+1
Thanks and well done!
Ray.
--
Raymond O'Donnell :: Galway :: Ireland
[email protected]
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: [PATCH] Cross-version navigation in documentation
@ 2012-06-12 23:18 Josh Kupershmidt <[email protected]>
parent: Josh Berkus <[email protected]>
1 sibling, 1 reply; 14+ messages in thread
From: Josh Kupershmidt @ 2012-06-12 23:18 UTC (permalink / raw)
To: Josh Berkus <[email protected]>; +Cc: pgsql-www
On Wed, Jun 6, 2012 at 5:12 PM, Josh Berkus <[email protected]> wrote:
>
>>> I suspect your browser has cached the old version of the CSS. Does a
>>> refresh solve it?
>
> Oh, wow, very nice! That should really help our "Google links to
> ancient version of the docs" problem.
I've been finding the feature quite useful, so thanks. One gripe I
just noticed: if I wind up on an /interactive/... link, e.g.
http://www.postgresql.org/docs/9.2/interactive/sql-createtable.html
and try to go to the -devel version from there, I'll always get a 404,
presumably since we don't have an interactive version of the -devel
docs. Would it be possible to redirect all the "/devel/interactive/"
links to their "/devel/static/" equivalents?
Josh
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: [PATCH] Cross-version navigation in documentation
@ 2012-06-13 07:01 Magnus Hagander <[email protected]>
parent: Josh Kupershmidt <[email protected]>
0 siblings, 0 replies; 14+ messages in thread
From: Magnus Hagander @ 2012-06-13 07:01 UTC (permalink / raw)
To: Josh Kupershmidt <[email protected]>; +Cc: Josh Berkus <[email protected]>; pgsql-www
On Wed, Jun 13, 2012 at 1:18 AM, Josh Kupershmidt <[email protected]> wrote:
> On Wed, Jun 6, 2012 at 5:12 PM, Josh Berkus <[email protected]> wrote:
>>
>>>> I suspect your browser has cached the old version of the CSS. Does a
>>>> refresh solve it?
>>
>> Oh, wow, very nice! That should really help our "Google links to
>> ancient version of the docs" problem.
>
> I've been finding the feature quite useful, so thanks. One gripe I
> just noticed: if I wind up on an /interactive/... link, e.g.
> http://www.postgresql.org/docs/9.2/interactive/sql-createtable.html
>
> and try to go to the -devel version from there, I'll always get a 404,
> presumably since we don't have an interactive version of the -devel
> docs. Would it be possible to redirect all the "/devel/interactive/"
> links to their "/devel/static/" equivalents?
That seems both reasonable and easy - so, done.
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
^ permalink raw reply [nested|flat] 14+ messages in thread
end of thread, other threads:[~2012-06-13 07:01 UTC | newest]
Thread overview: 14+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-05-27 18:06 [PATCH] Cross-version navigation in documentation Marti Raudsepp <[email protected]>
2012-05-27 18:40 ` Magnus Hagander <[email protected]>
2012-05-28 11:44 ` Andres Freund <[email protected]>
2012-05-30 09:58 ` Marti Raudsepp <[email protected]>
2012-06-05 08:59 ` Magnus Hagander <[email protected]>
2012-06-05 09:42 ` Andres Freund <[email protected]>
2012-06-05 10:02 ` Magnus Hagander <[email protected]>
2012-06-06 16:38 ` Dave Page <[email protected]>
2012-06-06 16:49 ` Marti Raudsepp <[email protected]>
2012-06-06 16:51 ` Dave Page <[email protected]>
2012-06-07 00:12 ` Josh Berkus <[email protected]>
2012-06-07 09:22 ` Raymond O'Donnell <[email protected]>
2012-06-12 23:18 ` Josh Kupershmidt <[email protected]>
2012-06-13 07:01 ` Magnus Hagander <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox