私はMeteorをクライアント側でのみ使用しており、オープングラフのメタタグを最適化しようとしています。上記の各プロパティのためなど、HEADの内容を検査すると、内容が<meta property="og:title" content="Blah" dochead="1">
として存在し、ブラウザでメテオのOGタグが動作しない
Router.route('/', function() {
setupOg();
if (isMobile()) {
this.render('landing_mobile');
$('body').css("overflow", "visible");
}
else {
this.render('landing');
$('body').css("overflow", "hidden");
}
});
function setupOg() {
var title = { property: "og:title", content: "Blah" };
var type = { property: "og:type", content: "website" };
var url = { property: "og:url", content: "https://blah.io" };
var image = { property: "og:image", content: "http://i63.tinypic.com/2howf4k.png" };
var siteName = { property: "og:site_name", content: "Blah" };
var description = { property: "blah blah blah." };
DocHead.addMeta(title);
DocHead.addMeta(type);
DocHead.addMeta(url);
DocHead.addMeta(image);
DocHead.addMeta(siteName);
DocHead.addMeta(description);
}
:私はkadira:dochead
を使用してルータに次のコードを入れています。
しかし、Facebook Sharing Debuggerを見ると、これらの最適化が見つからないようで、Linkedinで共有しようとすると同じことが起こります。どうしてこれなの?
注意、私のmain.html
は次のようになります。
<head>
<link rel="icon" sizes="16x16 32x32" href="/favicon.ico">
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Blah</title>
</head>
:[強化spiderableパッケージ](https://github.com/VeliovGroup/jazeee-meteor-spiderable)、[ES6サポート付きの事前レンダリング](https://ostr.io/info/prerendering) –