イヨノート

OGPタグ挿入 Movable Typeヘッダーモジュール

2011.12.02 Modified.

<mt:If name="entry_archive">
<mt:SetVarBlock name="title"><$mt:EntryTitle encode_html="1"$> | <$mt:BlogName encode_html="1"$></mt:SetVarBlock>
<mt:SetVarBlock name="pagedescription"><$mt:EntryExcerpt no_generate="1"$></mt:SetVarBlock>
<mt:SetVarBlock name="pageurl"><$mt:EntryPermalink$></mt:SetVarBlock>
<mt:SetVarBlock name="pageimage"><meta property="og:image" content="<mt:If tag="entryPageThumbs"><mt:entryPageThumbsAsset><$mt:AssetThumbnailURL width="200" $></MTentryPageThumbsAsset><mt:Else><$mt:BlogURL$>common/images/iconPageThumbs.png</mt:If>" /></mt:SetVarBlock>

<mt:ElseIf name="page_archive">
<mt:SetVarBlock name="title"><$mt:PageTitle$> | <$mt:BlogName encode_html="1"$></mt:SetVarBlock>
<mt:SetVarBlock name="pagedescription"><$mt:PageExcerpt no_generate="1"$></mt:SetVarBlock>
<mt:SetVarBlock name="pageurl"><$mt:PagePermalink$></mt:SetVarBlock>
<mt:SetVarBlock name="pageimage"><meta property="og:image" content="<$mt:BlogURL$>common/images/iconPageThumbs.png" /></mt:SetVarBlock>

<mt:ElseIf name="search_results">
<mt:SetVarBlock name="title">検索結果 | <$mt:BlogName encode_html="1"$></mt:SetVarBlock>
<mt:SetVarBlock name="pagedescription">hoge</mt:SetVarBlock>
<mt:SetVarBlock name="pageurl"><$mt:BlogURL$></mt:SetVarBlock>
<mt:SetVarBlock name="pageimage"><meta property="og:image" content="<$mt:BlogURL$>common/images/iconPageThumbs.png" /></mt:SetVarBlock>

<mt:else>
<mt:SetVarBlock name="title"><$mt:BlogName encode_html="1"$></mt:SetVarBlock>
<mt:SetVarBlock name="pagedescription">hoge</mt:SetVarBlock>
<mt:SetVarBlock name="pageurl"><$mt:BlogURL$></mt:SetVarBlock>
<mt:SetVarBlock name="pageimage"><meta property="og:image" content="<$mt:BlogURL$>common/images/iconPageThumbs.png" /></mt:SetVarBlock>
</mt:If>

<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8" />
<title><$mt:Var name="title"$></title>
<meta name="description" content="<$mt:Var name="pagedescription"$>" />
<meta name="keywords" content="" />
<meta name="author" content="" />
<meta name="apple-mobile-web-app-capable" content="no" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0" />
<meta name="format-detection" content="telephone=no" />
<link rel="icon" type="image/png" href="<$mt:BlogURL$>favicon.png" />
<link rel="apple-touch-icon-precomposed" href="<$mt:BlogURL$>iconApp.png" />
<link rel="alternate" type="application/atom+xml" title="Recent Entries" href="<$mt:Link template="feed_recent"$>" />
<link rel="stylesheet" type="text/css" href="<$mt:BlogURL$>common/stylesheets/common.css" />
<script type="text/javascript" src="<$mt:BlogURL$>common/scripts/common.js"></script>
<script type="text/javascript" src="<$mt:Link template="javascript"$>"></script>

<!-- fb -->
<meta property="og:title" content="<$mt:Var name="title"$>" />
<meta property="og:description" content="<$mt:Var name="pagedescription"$>" />
<meta property="og:type" content="website" />
<meta property="og:url" content="<$mt:Var name="pageurl"$>" />
<$mt:Var name="pageimage"$>
<meta property="og:site_name" content="<$mt:BlogName encode_html="1"$>" />
<meta property="og:email" content="" />
<meta property="og:phone_number" content="000-000-000" />
<!-- /fb -->

<!-- -->
<script type="text/javascript" src="<$mt:BlogURL$>common/tools/syntaxhighlighter_3.0.83/scripts/shCore.js"></script>
<script type="text/javascript" src="<$mt:BlogURL$>common/tools/syntaxhighlighter_3.0.83/scripts/shAutoloader.js"></script>
<script type="text/javascript" src="<$mt:BlogURL$>common/tools/syntaxhighlighter_3.0.83/scripts/shBrushXml.js"></script>
<link type="text/css" rel="stylesheet" href="<$mt:BlogURL$>common/tools/syntaxhighlighter_3.0.83/styles/shCoreDefault.css"/>
<script type="text/javascript">SyntaxHighlighter.all();</script>
<!-- / -->