kadirahq / meteor-dochead

Isomorphic way to manipulate document.head for Meteor apps
MIT License
132 stars 17 forks source link

Cant get Dochead to work? #29

Closed payner35 closed 8 years ago

payner35 commented 8 years ago

Im sure this is a basic problem.. but i cant get dochead to work at all?

I have tried to add it in a component... in a container.. in a componentDidMount etc..

import { DocHead } from 'meteor/kadira:dochead';

DocHead.setTitle("Some title");

i view source.. and do not see the meta.

Do i need Spiderable / phantom.js to make this work?

Im using Mantra.. not using Flow-Router SSR

arunoda commented 8 years ago

If it's with phantomjs this is rendered dynamically. You can see it with the view-source. But with inspect elements.

arunoda commented 8 years ago

If it's FlowRouter SSR, then you should do it someplace other than componentDidMount. That hook never runs in the server.

payner35 commented 8 years ago

So I must use Spiderable package to make this work.. (unless FlowRouter SSR)

arunoda commented 8 years ago

@payner35 yep.

rjakobsson commented 8 years ago

Would this work with prerender.io?

payner35 commented 8 years ago

ya... should do.. prerender works the same way as spiderable I believe.