使用Meteor.js配置SEO会导致主页/根页的2页标题 当我第一次加载网站时,它显示“您的主页的标题” 当通过铁路由器导航到家时,它显示“Home” 这是我使用manuel-schoebel的指南 此Github seems似乎存在问题 这是代码问题还是seo包的问题?
Router.coffee
Router.map ->
@route "home",
path: "/",
onAfterAction: ->
return unless Meteor.isClient
SEO.set
title: "Home"
meta:
description: "Home description"
@route "about",
path: "/about",
onAfterAction: ->
return unless Meteor.isClient
SEO.set
title: "About"
meta:
description: "About description"
seo.coffee
SeoCollection.insert
route_name: "home" # the name of the Iron-Router route
title: "Title of your home site"
meta: [ description: "This is the description of the document" ]
答案 0 :(得分:0)
我删除了SeoCollection.insert并将其替换为以下代码 我还必须删除Mongo数据库中的SEO文档 现在按预期工作。
Meteor.startup ->
if Meteor.isClient
SEO.config
title: "Website Name"
meta:
description: "Description"