It does not need to be tricky to get your AJAX site indexed correctly by
search engines.
Your site should be indexed as normal if you use HTML5 History.
If you use #!/
your site can be indexed correctly if you
provide ?_escaped_fragment_=
-pages. These can be either generated on
the fly or using a tool that generates snapshots.
Crawler.js is a Node.js-CLI
that generates static snapshots of your site using PhantomJS. Read more about it
at Googles site about
Making AJAX Applications Crawlable.