Ask Your Question
5

Make meta description relevant to current page.

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

todofixthis's avatar

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

Comments

1

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's avatar Evgeny  ( 2012-05-14 11:27:45 -0500 )edit
1

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

todofixthis's avatar todofixthis  ( 2012-05-14 15:18:13 -0500 )edit
1

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's avatar pajju  ( 2012-09-07 11:35:52 -0500 )edit

1 Answer

Sort by » oldest newest most voted
2

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

nr's avatar

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

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

Stats

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

Seen: 906 times

Last updated: Sep 06 '12