Continued from: Creating Routes in Discourse and Showing Data
Sorry for necro posting, but this seems to be relevant place to ask…
After following this and other tutorials about creating a route and showing data
I replicated this for a non admin /snack a page, and it works, and it shows my data perfectly!
So it looks something like this:
...</header>
<h1>donut</h1>
<hr>
<p>delicious!</p>
<footer>...
But i just realized, this page is not indexed, crawled, sitemapped, seo’ed etc etc anywhere, and apparently its because discourse pages have a non js, “crawler view” versions…
So… after following the above tutorial, Where to go from here to show the same data on a “crawler view”, non js version of that page?
Right now non js version looks like this:

...</header>
empty
<footer>...
It says “empty” with an actual text… that is because it loads default empty.html.erb, right? How to make it show our { name: "donut", description: "delicious!" } instead? ![]()
Tried some stuff from google, but nothing useful…
Stuff like… respond_to do… and format.html… and format.json…
And different kinds of render plain, text, html…
Nothing…
![]()
Separate .html.erb template for non js view maybe?
How to name it? Where to place it? How to get { name: "donut", description: "delicious!" } to it?
![]()
Help ![]()