Reputation: 2495
I am working on an application that needs to have some SEO standing. For starters it would be nice to get slug type search engine friendly urls that get generated based on document title. Does anyone know of any libraries or ways to get about doing that?
Secondly based on my reading it seems that if one wants better SEO that he/she get iron router since there are some 3rd party packages that seem to help with that (spiderable etc). Also iron router is easy with generating titles and meta tags. Is that a true assumption?
Upvotes: 0
Views: 345
Reputation: 181
If you use simple schema then you can do something like this:
Posts.attachSchema new SimpleSchema
title:
type: String
content:
type: String
url:
type: String
autoValue: ->
title = @field('title')
unless title.isSet then return
someEscapeFunction(title.value.substring(0, 120))
and pass url
as path
param in router
Upvotes: 1