search – Best approach to have Google index content primarily generated by Javascript

Your “tag” can be a combination of an A element and snippet of javascript. The href of the A element points to a crawlable page with your content, intended to be seen by search engines and those without javascript. For users with javascript, the A element gets replaced with the dynamic content (it can parse the href to determine which content to serve, to simplify things for those who want to drop it into their site). Users without javascript (and therefore search engines) will see a link to the content.

Also, on the content page, you can use javascript to send users back to the dynamic page. That way, if someone arrives via search engine, they’ll go to the page that linked them there.

It’s challenging to set it up so it doesn’t make it complex for people to drop your dynamic content into their site, but shouldn’t be that hard.