Hey folks, Can I put meta tag inside <head>
conditionally? Is it possible?
For example I need to add <meta name="robots" content="noindex">
on some routes. I don’t use spiderable
package, so it must rendered on server.
Hey folks, Can I put meta tag inside <head>
conditionally? Is it possible?
For example I need to add <meta name="robots" content="noindex">
on some routes. I don’t use spiderable
package, so it must rendered on server.
You can’t do it for some routes. It’ll apply to your whole app.
I wanted to do this to update the <title>
reactively - was not possible using template logic as the head is not part of the template
Have a look at this SO answer: http://stackoverflow.com/a/2568915/601455
Thank you. But I want to render it on server.
oh yeah sorry that is true, it is no good if you wait for the client to update it.
not sure what the best way forward is.
@arunoda I’m using https://meteorhacks.com/meteor-server-sider-rendering-for-seo-purpose.html this technique. So how about rendering on second response ( with _escaped_fragment_
)? Does it block indexing?
Ah! now I got it.
Yes, it’ll work.