Created
July 12, 2018 01:54
-
-
Save Lanace/e7a34a48aa82e62eb10ec11b1fb183c4 to your computer and use it in GitHub Desktop.
open-graph.html 설정
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Twitter Cards --> | |
<meta name="twitter:title" content="{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}"> | |
{% if page.excerpt %}<meta name="twitter:description" content="{{ page.excerpt | strip_html }}">{% endif %} | |
{% if site.owner.twitter %}<meta name="twitter:site" content="@{{ site.owner.twitter }}">{% endif %} | |
{% if author.twitter %}<meta name="twitter:creator" content="@{{ author.twitter }}">{% endif %} | |
{% if page.image.feature %} | |
<meta name="twitter:card" content="summary_large_image"> | |
<meta name="twitter:image" content="{{ site.url }}/images/{{ page.image.feature }}"> | |
{% else %} | |
<meta name="twitter:card" content="summary"> | |
<meta name="twitter:image" content="{% if page.image.thumb %}{{ site.url }}/images/{{ page.image.thumb }}{% else %}{{ site.url }}/images/{{ site.logo }}{% endif %}"> | |
{% endif %} | |
<!-- Open Graph --> | |
<meta property="og:locale" content="{{ site.locale }}"> | |
<meta property="og:type" content="article"> | |
<meta property="og:title" content="{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}"> | |
{% if page.image.feature %} | |
<meta name="og:image" content="{{ site.url }}/images/{{ page.image.feature }}"> | |
{% else %} | |
<meta name="og:image" content="{% if page.image.thumb %}{{ site.url }}/images/{{ page.image.thumb }}{% else %}{{ site.url }}/images/{{ site.logo }}{% endif %}"> | |
{% endif %} | |
{% if page.excerpt %}<meta property="og:description" content="{{ page.excerpt | strip_html }}">{% endif %} | |
<meta property="og:url" content="{{ page.url | replace:'index.html','' | prepend: site.url }}"> | |
<meta property="og:site_name" content="{{ site.title }}"> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment