How to set document title tag etc. for SEO

290 views
Skip to first unread message

Sanjay

unread,
Apr 30, 2009, 8:19:15 AM4/30/09
to sphinx-dev
Hi,

I am new to sphinx. Could not find how to set the title tag, meta tag
etc. to make the site SEO friendly. Needing help.

thanks,
Sanjay

Sanjay

unread,
May 8, 2009, 7:56:11 AM5/8/09
to sphinx-dev
Hi,

> I am new to sphinx. Could not find how to set the title tag, meta tag
> etc. to make the site SEO friendly. Needing help.

Would appreciate some clues.

thanks,
Sanjay

Doug Hellmann

unread,
May 8, 2009, 8:54:58 AM5/8/09
to sphin...@googlegroups.com

The title comes from the title of the document. I don't think the
default sphinx templates include a meta tag for keywords, but you
could create your own templates that do.

Doug

Georg Brandl

unread,
May 8, 2009, 1:30:20 PM5/8/09
to sphin...@googlegroups.com
Sanjay schrieb:

There is a "meta" directive that you can use to create HTML meta tags, see
<http://docutils.sourceforge.net/docs/ref/rst/directives.html#meta>.

If you want to write this only once for all documents, see
<http://sphinx.pocoo.org/config.html#confval-rst_epilog>.

cheers,
Georg

Sanjay

unread,
May 11, 2009, 10:39:33 AM5/11/09
to sphinx-dev
Hi Doug & Georg,

Thanks for the useful inputs.

> The title comes from the title of the document.

As I know, the first line becomes the title. Is there a way to set
invisible titles so that more words can be injected to make it SEO
friendly?

thanks,
Sanjay

Guenter Milde

unread,
May 11, 2009, 11:19:48 AM5/11/09
to sphin...@googlegroups.com
On 2009-05-11, Sanjay wrote:

> Hi Doug & Georg,

In Docutils, you can use the ``.. title::`` directive. See
http://docutils.sf.net/docutils/docs/ref/rst/directives.html

Günter

Sanjay

unread,
May 12, 2009, 2:59:27 AM5/12/09
to sphinx-dev
Hi Guenter,

> In Docutils, you can use the ``.. title::`` directive. Seehttp://docutils.sf.net/docutils/docs/ref/rst/directives.html

Thanks a lot for this input. However, I tried giving this near the top
of the document:

.. title:: Some title I want to appear

But it did not work. Wondering why. Any clues would help.

thanks,
Sanjay

Guenter Milde

unread,
May 12, 2009, 8:27:19 AM5/12/09
to sphin...@googlegroups.com
On 2009-05-12, Sanjay wrote:

> Hi Guenter,

>> In Docutils, you can use the ``.. title::`` directive.

>> See http://docutils.sf.net/docutils/docs/ref/rst/directives.html

> Thanks a lot for this input. However, I tried giving this near the top
> of the document:

> .. title:: Some title I want to appear

> But it did not work. Wondering why. Any clues would help.

Seems to be one of the Docutils <-> Sphinx incompatibilities. Consider
filing an enhancement request.

Günter

Georg Brandl

unread,
May 13, 2009, 3:00:17 AM5/13/09
to sphin...@googlegroups.com
Sanjay schrieb:

It seems I've not included this in Sphinx -- I'll try to get it working.

Georg

Sanjay

unread,
May 16, 2009, 2:22:11 AM5/16/09
to sphinx-dev
> Seems to be one of the Docutils <-> Sphinx incompatibilities. Consider
> filing an enhancement request.

It is here:

http://bitbucket.org/birkenfeld/sphinx/issue/173/implementing-title-directive-in-sphinx

thanks,
Sanjay

Sanjay

unread,
May 25, 2009, 10:27:34 AM5/25/09
to sphinx-dev
> It is here:
>
> http://bitbucket.org/birkenfeld/sphinx/issue/173/implementing-title-d...
>

Thanks for so quick resolution. It works nicely except for one thing -
now the titles are coming as link text for "Previous Page," "Next
page," and on the breadcrumb, which is quite inconvenient as I am
using long titles for SEO.

I tried customizing the link text in the toctree directive, but it did
not help.

Would need help again.

thanks,
Sanjay

Sanjay

unread,
May 26, 2009, 8:21:00 AM5/26/09
to sphinx-dev
> >http://bitbucket.org/birkenfeld/sphinx/issue/173/implementing-title-d...
>
> Thanks for so quick resolution. It works nicely except for one thing -
> now the titles are coming as link text for "Previous Page," "Next
> page," and on the breadcrumb, which is quite inconvenient as I am
> using long titles for SEO.
>
> I tried customizing the link text in the toctree directive, but it did
> not help.

Seems like a bug needing to be resolved before the ..title:: directive
can be actually useful. Seeking attention...

thanks,
Sanjay
http://www.sanjaypatel.name

Sanjay

unread,
Jun 1, 2009, 5:31:49 AM6/1/09
to sphinx-dev
Reply all
Reply to author
Forward
0 new messages