[Blogger] Vaster2 に JSON-LD で SiteNavigationElement をマークアップしてみました。[JSON-LD]

更新  
公開
当サイトはアフィリエイト広告を使用しています

Blogger Vaster2



この記事は最後の更新から3年以上が経過しています

検索結果にどのような変化が出るのかわかりませんが、物はためしに追加してみました。

<script type="application/ld+json">
 [
 {
  "@context": "https://schema.org",
  "@type": "SiteNavigationElement",
  "name": "ホーム",
  "url": "https://sutasutashiki.blogspot.com/?max-results=10"
 },
 {
  "@context": "https://schema.org",
  "@type": "SiteNavigationElement",
  "name": "暮らし",
  "url": "https://sutasutashiki.blogspot.com/search/label/%E6%9A%AE%E3%82%89%E3%81%97?max-results=10/"
 },
 {
  "@context": "https://schema.org",
  "@type": "SiteNavigationElement",
  "name": "DIY",
  "url": "https://sutasutashiki.blogspot.com/search/label/DIY?max-results=10"
 },
 {
  "@context": "https://schema.org",
  "@type": "SiteNavigationElement",
  "name": "Bloggerカスタム",
  "url": "https://sutasutashiki.blogspot.com/search/label/Blogger%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%A0?max-results=10"
 },
 {
  "@context": "https://schema.org",
  "@type": "SiteNavigationElement",
  "name": "Vaster1.9",
  "url": "https://sutasutashiki.blogspot.com/search/label/Vaster1.9?max-results=10"
 },
 {
  "@context": "https://schema.org",
  "@type": "SiteNavigationElement",
  "name": "Vaster2",
  "url": "https://sutasutashiki.blogspot.com/search/label/Vaster2?max-results=10"
 }
 ]
</script>

参考サイト

Google グループ

SiteNavigationElement example in JSON-LD - Google プロダクト フォーラム

Google グループでは、オンライン フォーラムやメール ベースのグループを作成したり、こうしたフォーラムやグループに参加したりすることで、大勢のユーザーと情報の共有やディスカッションを行うことができます。

構造化データテストツールでの見え方 (スクリーンショット)

ここをクリックするとスクリーンショットが表示されます。

トップページ

記事ページ

このコードもためしてみました

<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "SiteNavigationElement",
"name": [
    "ホーム",
    "暮らし",
    "DIY",
    "Bloggerカスタム",
    "Vaster1.9",
    "Vaster2"
    ],
"url": [
    "https://sutasutashiki.blogspot.com/?max-results=10",
    "https://sutasutashiki.blogspot.com/search/label/%E6%9A%AE%E3%82%89%E3%81%97?max-results=10/",
    "https://sutasutashiki.blogspot.com/search/label/DIY?max-results=10",
    "https://sutasutashiki.blogspot.com/search/label/Blogger%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%A0?max-results=10",
    "https://sutasutashiki.blogspot.com/search/label/Vaster1.9?max-results=10",
    "https://sutasutashiki.blogspot.com/search/label/Vaster2?max-results=10"
    ]
}
]
</script>

参考サイト

コーポレートサイトをJSON-LDで構造化データマークアップ(schema.org) | MH MAG

構造化データテストツールでの見え方 (スクリーンショット)

ここをクリックするとスクリーンショットが表示されます。

トップページ

記事ページ

出来なかったこと

はじめはここら辺の <nav> とか <ul>

 <b:includable id='main'>
<div class='button-toggle'><i class='fa fa-bars'/>メニューを開く</div>
              <nav class='grobal-navi'>
                <ul class='header-nav'>
                  <b:loop values='data:links' var='link'>
                    <li>
                      <a expr:href='data:link.href + &quot;?max-results=10&quot;'>
                        <data:link.title/>
                      </a>
                    </li>
                  </b:loop>
                </ul>
                </nav>
                <b:include name='quickedit'/>

              </b:includable>

itemscope='itemscope' itemtype='https://www.schema.org/SiteNavigationElement'>

をつければ、動的にマークアップできるかと思いやってみましたが、自分の環境ではうまく機能しませんでした。

なので、やや面倒でしたが JSON-LD でマークアップしました。



検索

お知らせ

カテゴリー

Random Picks

すたすた式

Enjoy!👍

QooQ