bellroy / lesswrong-migrated

Automatically exported from code.google.com/p/lesswrong
Other
0 stars 0 forks source link

Populate 'description' metadata on post pages #280

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
HTML supports metadata like

    <meta name="description" content="categorized list of articles" />

The description metadata is used by many Web services to generate a short 
summary of the page, which is particularly useful in a social media setting.

Without any description metadata, the services resort to heuristics which fail 
spectacularly on LessWrong; look at the attached screenshot of how 2 LW shares 
on Google+ look - in both, the *only* useful info is the title, and the 
description is just distracting gunk.

There is no obvious way in the UI for authors to add this metadata and an 
additional field would be a large patch; hence, I suggest something simpler: 
populate the description metadata either by

1. copying in the tags for a post, which would at least say something about the 
post's topic and represent a major usability improvement over the 
guaranteed-unrelated junk
2. copy in the first N characters (first sentence?) of the post.

Original issue reported on code.google.com by gwe...@gmail.com on 12 Dec 2011 at 2:12

Attachments:

GoogleCodeExporter commented 9 years ago
1) It definitely seems like a human-readable description would be superior to a 
bunch of tags; I favor the first-N-characters idea.

2) There may be a better way to provide this data than using a description meta 
tag that has redundant information in it from the same page.  Google suggests 
that by associating page elements with schema.org attributes, we can get it to 
parse out the right text for the title and description.  So this might work if 
we just appropriately annotate the element containing the post text.  See 
https://developers.google.com/+/plugins/+1button/#plus-snippet for description 
of Google's behavior.

Original comment by mquan...@gmail.com on 12 Dec 2011 at 5:51

GoogleCodeExporter commented 9 years ago
I don't think redundancy really matters - have you looked at the page source, 
it's pretty grotesque already. The question is which would be *easier to 
implement* for you. I would just like this done, I'm not going to bikeshed or 
NIH over whether to use snippets or '<meta description=>'.

Attached is an example of Google+ using the first-N-characters heuristic for 
Wikipedia, where it mostly works.

Original comment by gwe...@gmail.com on 12 Dec 2011 at 6:17

Attachments:

GoogleCodeExporter commented 9 years ago
I suspect the easiest would be the first-N-characters idea.  It should be 
straightforward to grab the article body, strip the html markup (see killhtml 
in filters.py) and add another tag to the <head> section (see base.html).

Original comment by DRPow...@gmail.com on 13 Dec 2011 at 4:18

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I submitted a patch for this issue that implements the "name" and "description" 
schema.org attributes; that seemed like both the easiest to implement and 
likely the best way to do it.

https://github.com/tricycle/lesswrong/pull/13/

@DRPowell -- I didn't see your comment before making my change -- if you 
believe that the meta tag approach has greater merit (I'm relatively clueless 
about which is better) then I'll go back and do that instead.

Original comment by mquan...@gmail.com on 13 Dec 2011 at 5:58

GoogleCodeExporter commented 9 years ago
This looks fine.  I'm not sure how well Google+ will pick this up, but it is 
worth a try.  I'll deploy it now.

@gwern - I don't use Google+, can you close this ticket once you confirm it 
works satisfactorily.

Original comment by DRPow...@gmail.com on 14 Dec 2011 at 2:07

GoogleCodeExporter commented 9 years ago
Looks much better - now it actually gives some clue as to content.

Good work everyone.

Original comment by gwe...@gmail.com on 14 Dec 2011 at 2:12

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by wjmo...@gmail.com on 20 Apr 2012 at 6:25