mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
42 lines
1.5 KiB
HTML
42 lines
1.5 KiB
HTML
<template name="pkg_spiderable">
|
|
{{#better_markdown}}
|
|
## `spiderable`
|
|
|
|
|
|
The `spiderable` package is a temporary solution to allow web search
|
|
engines to index a Meteor application. It uses the <a target="_blank"
|
|
href="https://developers.google.com/webmasters/ajax-crawling/">AJAX
|
|
Crawling specification</a> published by Google to serve HTML to
|
|
compatible spiders (Google, Bing, Yandex, and more).
|
|
|
|
When a spider requests an HTML snapshot of a page the Meteor server runs
|
|
the client half of the application inside <a target="_blank"
|
|
href="http://phantomjs.org/">phantomjs</a>, a headless browser, and
|
|
returns the full HTML generated by the client code.
|
|
|
|
{{#warning}}
|
|
This is a temporary approach to allow Meteor applications to be
|
|
searchable. Expect significant changes to this package.
|
|
{{/warning}}
|
|
|
|
In order to have links between multiple pages on a site visible to
|
|
spiders, apps must use real links (eg `<a href="/about">`) rather than
|
|
simply re-rendering portions of the page when an element is
|
|
clicked. Apps should render their content based on the URL of the page
|
|
and can use HTML5 push-state to alter the URL on the client without
|
|
triggering a page reload. See the <a target="_blank"
|
|
href="http://meteor.com/examples/todos">Todos example</a> for a
|
|
demonstration.
|
|
|
|
|
|
{{#warning}}
|
|
If you deploy your application with `meteor bundle`, you must install
|
|
`phantomjs` (<a target="_blank"
|
|
href="http://phantomjs.org/">http://phantomjs.org</a>) somewhere in your
|
|
`$PATH`. If you use `meteor deploy` this is already taken care of.
|
|
{{/warning}}
|
|
|
|
|
|
{{/better_markdown}}
|
|
</template>
|