Search facility for new documentation

7 views
Skip to first unread message

Fraser Nevett

unread,
Aug 30, 2008, 1:22:10 PM8/30/08
to Django developers
The new documentation site is great, but is currently lacking a search
facility. I've been working on adding an embedded Google Custom
Search, which is nearly ready and working well on my local copy.

I'll submit a patch for this to Trac shortly, but it would really help
if someone who knows about the new docs could please answer a few
questions:

1. Is http://docs.djangoproject.com/ where the new docs will live
permanently, or will they be moved to http://www.djangoproject.com/documentation/
when they are "ready"?

2. If the subdomain is being used, I assume at some point the main
site's navigation will be updated and redirects applied to the /
documentation/ URLs. At which point, where will the old (0.95 and
0.96) documentation live? Will it be moved to /en/0.95/ and /en/0.96/
on the subdomain?

3. Currently all the new docs are under /en/dev/. When Django 1.0 is
released, will they be copied to /en/1.0/?

Thanks,

Fraser

Jacob Kaplan-Moss

unread,
Aug 30, 2008, 3:31:54 PM8/30/08
to django-d...@googlegroups.com
Please keep in mind the the new docs are a sort of preview release --
you'll note we've not announced 'em in any official manner -- and so
are rough around the edges. Please be patient -- I'll be cleaning
these things up by the time we push 1.0.

On Sat, Aug 30, 2008 at 12:22 PM, Fraser Nevett <fra...@gmail.com> wrote:
> The new documentation site is great, but is currently lacking a search
> facility. I've been working on adding an embedded Google Custom
> Search, which is nearly ready and working well on my local copy.

Sphinx has a built-in search function; I just haven't exposed it yet.
That said, there's a good change the Google will beat anything we can
possibly do ourselves, so I'm looking forward to seeing what you've
come up with.

> 1. Is http://docs.djangoproject.com/ where the new docs will live
> permanently, or will they be moved to http://www.djangoproject.com/documentation/
> when they are "ready"?

The former. The 1.0 docs will live at docs.; the earlier stuff will
remain at the previous locations for posterity.

> 2. If the subdomain is being used, I assume at some point the main
> site's navigation will be updated and redirects applied to the /
> documentation/ URLs. At which point, where will the old (0.95 and
> 0.96) documentation live? Will it be moved to /en/0.95/ and /en/0.96/
> on the subdomain?

No; the old docs will stay where they are; 1.0+ will be in the new place.

> 3. Currently all the new docs are under /en/dev/. When Django 1.0 is
> released, will they be copied to /en/1.0/?

The latest docs will always be at /<lang>/dev/; versions frozen with
each release will be at /<lang>/<version>/.

Jacob

julianb

unread,
Aug 30, 2008, 5:52:51 PM8/30/08
to Django developers
On Aug 30, 9:31 pm, "Jacob Kaplan-Moss" <jacob.kaplanm...@gmail.com>
wrote:
> The latest docs will always be at /<lang>/dev/; versions frozen with
> each release will be at /<lang>/<version>/.

On this occasion, why not change "New in Django development version"
remarks to "New in this version"? That makes much more sense, since
the docs get frozen for each version, so you know now and later this
was new in dev/1.0/1.1...

Ramiro Morales

unread,
Aug 30, 2008, 6:07:18 PM8/30/08
to django-d...@googlegroups.com
On Sat, Aug 30, 2008 at 6:52 PM, julianb <julia...@gmail.com> wrote:

> On this occasion, why not change "New in Django development version"
> remarks to "New in this version"? That makes much more sense, since
> the docs get frozen for each version, so you know now and later this
> was new in dev/1.0/1.1...

From what i?ve heard I'd say facilities offered by Sphinx
(see http://sphinx.pocoo.org/markup/para.html#dir-versionadded)
are going to be used for this.

Regards,
--
Ramiro Morales

Ronny Haryanto

unread,
Aug 31, 2008, 2:17:08 AM8/31/08
to django-d...@googlegroups.com
On Sun, Aug 31, 2008 at 12:22 AM, Fraser Nevett <fra...@gmail.com> wrote:
> The new documentation site is great, but is currently lacking a search
> facility.

If you do 'make html' in the docs directory you'll get a search
facility provided by sphinx. It's just that the resulting links are
missing ".html" at the end.

Ronny

julianb

unread,
Aug 31, 2008, 6:40:36 AM8/31/08
to Django developers
On Aug 31, 12:07 am, "Ramiro Morales" <cra...@gmail.com> wrote:
> From what i?ve heard I'd say facilities offered by Sphinx
> (seehttp://sphinx.pocoo.org/markup/para.html#dir-versionadded)
> are going to be used for this.

That would be good then. Currently it is written directly as text,
which seems a bit inconvenient.

Fraser Nevett

unread,
Aug 31, 2008, 7:53:19 AM8/31/08
to Django developers
On Aug 30, 8:31 pm, "Jacob Kaplan-Moss" <jacob.kaplanm...@gmail.com>
wrote:
> Sphinx has a built-in search function; I just haven't exposed it yet.
> That said, there's a good change the Google will beat anything we can
> possibly do ourselves, so I'm looking forward to seeing what you've
> come up with.

I have created a ticket and uploaded my patch: http://code.djangoproject.com/ticket/8723

I also had a quick look at Sphinx's built-in search tool. From what I
can see it it stores a search index in JSON and uses Javascript to
perform the search. I tried this out, but searching for some generic
terms such as "settings", "templates" and "models" didn't yield
particularly helpful results, whereas Google did.

Sphinx's search could be useful if you're working with an offline copy
of the docs, but Google seem to give much better results so is
probably preferable for the docs web site.

Cheers,

Fraser

Marc Fargas

unread,
Aug 31, 2008, 1:07:40 PM8/31/08
to django-d...@googlegroups.com
Hi,
The changes to the versionadded and versionchanged tags are done on my
git branch. So, when jacob merges them they'll be changed.

Regards,
Marc


--
--
http://www.marcfargas.com - will be finished someday.

Antonio Cavedoni

unread,
Sep 2, 2008, 10:13:53 AM9/2/08
to django-d...@googlegroups.com
On Sun, Aug 31, 2008 at 1:53 PM, Fraser Nevett <fra...@gmail.com> wrote:
> Sphinx's search could be useful if you're working with an offline copy
> of the docs, but Google seem to give much better results so is
> probably preferable for the docs web site.

FWIW: I have an almost finished (only needs packaging and some
documentation) reusable Django app that wraps around Google Business
Search. It's basically the same thing as the Google Custom Search
that's currently in place, only it doesn't work off an iframe and
doesn't have any ads.

The downside is that it's for pay, about $100 a year IIRC.

My app would be free anyway. If there's interest I can package and release it.

Cheers.
--
Antonio

Jacob Kaplan-Moss

unread,
Sep 2, 2008, 11:06:55 AM9/2/08
to django-d...@googlegroups.com
On Tue, Sep 2, 2008 at 9:13 AM, Antonio Cavedoni <ant...@cavedoni.org> wrote:
> FWIW: I have an almost finished (only needs packaging and some
> documentation) reusable Django app that wraps around Google Business
> Search. It's basically the same thing as the Google Custom Search
> that's currently in place, only it doesn't work off an iframe and
> doesn't have any ads.
>
> The downside is that it's for pay, about $100 a year IIRC.
>
> My app would be free anyway. If there's interest I can package and release it.

/me raises hand :)

Yeah, I'd love to see it; if it integrates better -- the custom search
looks like shit, frankly -- it might be worth the money.

Jacob

Antonio Cavedoni

unread,
Sep 2, 2008, 12:38:25 PM9/2/08
to django-d...@googlegroups.com
Hi Jacob,

On Tue, Sep 2, 2008 at 5:06 PM, Jacob Kaplan-Moss wrote:
> Yeah, I'd love to see it; if it integrates better -- the custom search
> looks like shit, frankly -- it might be worth the money.

See here:

http://code.unicoders.org/wiki/DjangoGoogleSearch

There's some documentation now, although this is of course not a
proper public release. I've been using this code in production for a
while now and it hasn't crashed on me yet, but of course your mileage
may vary. I've been using it in production here for about five months
now, without any major issues:

http://mytech.it/search/?q=test

HTH,
--
Antonio

Reply all
Reply to author
Forward
0 new messages