关注此博客post我使用此package来设置我的搜索引擎优化。当页面标题在标题栏上正确显示时,当我curl http://localhost:3000/about -4
进入网页时,我看不到任何元标记。我正在设置与以下文档完全相同的所有内容:
Router.route('/about', {
'name': 'About',
'action': function() {
this.render('About', {
to: 'content'
});
},
'onAfterAction': function() {
if (!Meteor.isClient) {
return;
}
SEO.set({
title: "My website",
meta: {
'description': "testing."
}
});
}
});
答案 0 :(得分:3)
SEO
包修改浏览器上的标签。这意味着如果您在浏览器中加载它。
要使用curl查看它,请确保您已安装spiderable
个软件包,安装了phantomjs并使用curl http://localhost:3000/about?_escaped_fragment_=#
答案 1 :(得分:-1)
curl
没有运行JS。所以流星类的东西都不起作用。您需要服务器端渲染。检查this blog。