Permalink
Browse files

improve jsonld and meta tag

  • Loading branch information...
1 parent 95bf5c6 commit 2320d2f6725a5fc57b5bece5984a1b57a47355e5 Daisuke Tsuji committed Oct 18, 2016
Showing with 14 additions and 13 deletions.
  1. +9 −10 layouts/partials/single_json_ld.html
  2. +5 −3 layouts/partials/single_meta.html
@@ -1,35 +1,34 @@
<script type="application/ld+json">
{
"@context": "http://schema.org",
- "@type": "Article",
- "mainEntityOfPage":{
- "@type":"WebPage",
+ "@type": "NewsArticle",
+ "mainEntityOfPage": {
+ "@type": "WebPage",
"@id":"{{ .Site.BaseURL }}"
},
"headline": "{{ .Title }} - {{ .Site.Title }}",
"image": {
"@type": "ImageObject",
"url": "{{ .Site.BaseURL }}{{ .Params.thumbnail | default "images/default.png" }}",
- "height": 700,
- "width": 700
+ "height": 800,
+ "width": 800
},
"datePublished": "{{ .Date.Format "2006-01-02T15:04:05JST" }}",
"dateModified": "{{ .Lastmod.Format "2006-01-02T15:04:05JST" }}",
"author": {
"@type": "Person",
- "name": "{{ .Site.Title }}",
- "image": "{{ .Site.BaseURL }}images/logo.png"
+ "name": "{{ .Site.Title }}"
},
"publisher": {
"@type": "Organization",
"name": "{{ .Site.Title }}",
"logo": {
"@type": "ImageObject",
"url": "{{ .Site.BaseURL }}images/logo.png",
- "height": 60,
- "width": 60
+ "width": 600,
+ "height": 60
}
},
- "description": "{{ .Summary | plainify }}"
+ "description": "{{ .Description | default .Summary }}"
}
</script>
@@ -1,15 +1,17 @@
+<meta name="description" content="{{ replaceRE "\n" "" (.Description | default .Summary) }}">
+
<meta property="og:title" content="{{ .Title }} - {{ .Site.Title }}">
<meta property="og:type" content="article">
<meta property="og:url" content="{{ .Permalink }}">
<meta property="og:image" content="{{ .Site.BaseURL }}{{ .Params.thumbnail | default "images/default.png" }}">
<meta property="og:site_name" content="{{ .Site.Title }}">
-<meta property="og:description" content="{{ replaceRE "\n" "" (.Summary | plainify) }}">
+<meta property="og:description" content="{{ replaceRE "\n" "" (.Description | default .Summary) }}">
<meta property="og:locale" content="ja_JP">
-<meta name="twitter:card" content="summary">
+<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="{{ .Site.Title }}">
<meta name="twitter:url" content="{{ .Permalink }}">
<meta name="twitter:title" content="{{ .Title }} - {{ .Site.Title }}">
-<meta name="twitter:description" content="{{ replaceRE "\n" "" (.Summary | plainify) }}">
+<meta name="twitter:description" content="{{ replaceRE "\n" "" (.Description | default .Summary) }}">
<meta name="twitter:image" content="{{ .Site.BaseURL }}{{ .Params.thumbnail | default "images/default.png" }}">

0 comments on commit 2320d2f

Please sign in to comment.