Ask Your Question

Make meta description relevant to current page.

asked 2012-05-14 10:45:50 -0600

todofixthis gravatar image

I notice that the meta description for every page on my site – homepage, questions, profiles – is the same:

A community for expats to meet and share knowledge

Since sites like Facebook and Google use this information to display summaries for links to pages on my site, it would be much better for the meta description to be relevant to the current page:

  • Questions: Use the first n words of the question text.
  • Profiles: Use the first n words of the user's "about me" text (if applicable).
  • Meta Pages (/badges, /users, etc.): Each of these pages should have its own meta description that describes its unique purpose.
edit retag flag offensive close merge delete



This sounds reasonable, maybe make meta almost the same as page title with a site name prepended and maybe few most frequently used tags?

Evgeny gravatar imageEvgeny ( 2012-05-14 11:27:45 -0600 )edit

Agreed, although I would suggest appending the site name rather than prepending it (put the most relevant/specific information first).

todofixthis gravatar imagetodofixthis ( 2012-05-14 15:18:13 -0600 )edit

Why first n words? Questions: Use the first n words of the question text.

I think its neat to include the whole question as title. Anyway Facebook cuts texts to fit the frames; so let's not worry. :)

pajju gravatar imagepajju ( 2012-09-07 11:35:52 -0600 )edit

1 Answer

Sort by » oldest newest most voted

answered 2012-09-06 10:19:39 -0600

nr gravatar image

updated 2012-09-06 10:20:45 -0600

Hi, I see on question.html template, this line of code

{% block meta_description %}
        <meta name="description" content="{{question.summary|striptags|escape}}" />
{% endblock %}

but the real page meta description is still the default one "Open source question and answer forum written in Python and Django", probably taken from the default meta_description block definition inside html_head_meta.html

If you look at the meta description of this page you see the same bug!

This is only a relative little problem, but I see that block overrides don't work in the whole templating system. Can someone have a look at this?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2012-05-14 10:45:50 -0600

Seen: 731 times

Last updated: Sep 06 '12