Using Meteorhacks:SSR and Iron:Router.
A temporary solution for spiderability to Meteor without PhantomJS and similar until Meteor and Iron:Router supports server-side rendering.
Notice! Should not work with coffee script. And probably not on Windows (untested).
meteor add studiointeract:spiderable
This package renders templates on the server.
First create a symlink for the client folder to private.
meteor create my-app
cd my-app
ln -s client/ private/
Add ?_escaped_fragment_=
to the query of your routes and it will now render with SSR!
For example visit the frontpage of your app: http://localhost:3000/?_escaped_fragment_=
We symlink the client folder to private, which makes it available on the server.
- By loading all client templates and scripts as assets via private.
- Compiling templates data into templates.
- Parsing Iron:Router and extracting where all templates and layouts should go.
Notice! Use with caution – test all routes so they don't break your app!
Notice! It is now important to make sure things can run on the server too.