← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~mbp/launchpad/meta-description into lp:launchpad

 

Martin Pool has proposed merging lp:~mbp/launchpad/meta-description into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~mbp/launchpad/meta-description/+merge/82769

Google sometimes generates lame page summaries for Launchpad pages, containing garbage that occurs near the start of the page.

We can give it a better clue by putting in meta description tags. 

For an actual search it will often but not always generate its own summary looking at the page text, but the meta description is sometimes used, and apparently always used on g+, and probably also by other services.

See:

http://googlewebmastercentral.blogspot.com/2007/09/improve-snippets-with-meta-description.html

before: https://plus.google.com/112646476239496153808/posts/bMVdVYUP6XA

after: https://plus.google.com/112646476239496153808/posts/BRxTsjaUeWu

hooray!

We could do this for other pages too, but bugs are probably one of the top hits.

-- 
https://code.launchpad.net/~mbp/launchpad/meta-description/+merge/82769
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~mbp/launchpad/meta-description into lp:launchpad.
=== modified file 'lib/lp/bugs/templates/bugtask-index.pt'
--- lib/lp/bugs/templates/bugtask-index.pt	2011-11-10 10:51:37 +0000
+++ lib/lp/bugs/templates/bugtask-index.pt	2011-11-19 06:58:27 +0000
@@ -7,6 +7,9 @@
 >
   <body>
     <metal:block fill-slot="head_epilogue">
+      <meta name="description" 
+        tal:attributes="content python: context.bug.description[:500]">
+
       <script type='text/javascript' tal:content="string:var yui_base='${yui}';" />
       <script type='text/javascript' id='available-official-tags-js'
               tal:content="view/available_official_tags_js" />


Follow ups