Skip to content

Instantly share code, notes, and snippets.

@sankitch
Created May 9, 2012 03:57
Show Gist options
  • Save sankitch/2641685 to your computer and use it in GitHub Desktop.
Save sankitch/2641685 to your computer and use it in GitHub Desktop.
Octopress Facebook OGP
<meta property="og:title" content="{% if page.title %}{{ page.title }} - {% endif %}{{ site.title }}" />
<meta property="og:description" content="{{ description | strip_html | condense_spaces | truncate:150 }}" />
<meta property="og:url" content="{{ canonical }}" />
<meta property="og:image" content="{% if page.ogp_image %}{{ page.ogp_image }}{% else %}{{ site.default_ogp_image }}{% endif %}" />
<meta property="og:author" content="{{ site.author }}" />
<meta property="og:site_name" content="{{ site.title }}" />
<meta property="og:locale" content="{{ site.facebook_locale }}" />
<meta property="og:type" content="{% if page.index %}blog{% else %}article{% endif %}" />
<meta property="fb:app_id" content="{{ site.facebook_app_id }}" />
@wayne930242
Copy link

Thanks for sharing this note. Could you let me know how to set the "page.ogp_image"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment