# Aangepaste route wordt niet geïndexeerd/verschijnt niet in crawlerweergave

**URL:** https://meta.discourse.org/t/custom-route-not-being-indexed-appearing-in-crawler-view/309403
**Category:** Development
**Created:** [25 mei 2024 om 18:46 UTC](https://meta.discourse.org/t/custom-route-not-being-indexed-appearing-in-crawler-view/309403 "2024-05-25T18:46:44Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![MrBug](https://avatars.discourse-cdn.com/v4/letter/m/bbe5ce/32.png) [@MrBug](https://meta.discourse.org/u/MrBug)
#### Post date: [25 mei 2024 om 18:46 UTC](https://meta.discourse.org/t/custom-route-not-being-indexed-appearing-in-crawler-view/309403/1 "2024-05-25T18:46:44Z")

</div>

Continued from: [Creating Routes in Discourse and Showing Data](https://meta.discourse.org/t/creating-routes-in-discourse-and-showing-data/48827)

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:

```plaintext
...</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:

 ![image](https://global.discourse-cdn.com/meta/original/4X/e/6/5/e659d728f6ce33780b1e03f592b6c579cd99022e.png)

```plaintext
...</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 😀

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [25 mei 2024 om 19:41 UTC](https://meta.discourse.org/t/custom-route-not-being-indexed-appearing-in-crawler-view/309403/2 "2024-05-25T19:41:12Z")

</div>

> [@MrBug](#):
>
> Separate ._html_._erb_ template for non js view maybe

I don’t know. But you definitely need a non js template. What happens if you visit the page with javascript off?

---

<div class="post-metadata">

### Author: ![MrBug](https://avatars.discourse-cdn.com/v4/letter/m/bbe5ce/32.png) [@MrBug](https://meta.discourse.org/u/MrBug)
#### Post date: [25 mei 2024 om 19:56 UTC](https://meta.discourse.org/t/custom-route-not-being-indexed-appearing-in-crawler-view/309403/3 "2024-05-25T19:56:00Z")

</div>

It shows the usual non js page… header… footer…

> [@MrBug](#):
>
> Right now non js version looks like this:
> 
> ![image](https://global.discourse-cdn.com/meta/original/4X/e/6/5/e659d728f6ce33780b1e03f592b6c579cd99022e.png)
> 
> ```plaintext
> ...</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? 🙂

But thats as expected, since every tutorial only covers how to feed json data to a ember template…

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [11 juni 2024 om 11:41 UTC](https://meta.discourse.org/t/custom-route-not-being-indexed-appearing-in-crawler-view/309403/5 "2024-06-11T11:41:27Z")

</div>

JavaScript only pages are not crawled afair.

You might want to take a look at something I was working on:

> **[The Home Pages Add-on - integrate static content from Landing Pages and add...](https://coop.pavilion.tech/t/the-home-pages-add-on-integrate-static-content-from-landing-pages-and-add-dynamic-pages-too/3554)**
>
> What are “Dynamic” and “Simple Pages” There are special pages facilitated by the Pavilion Landing Pages plugin and the new Home Pages Theme Component. The new Home Pages Theme Component is required to blend the content of the Landing Pages into...

---

<div class="post-metadata">

### Author: ![MrBug](https://avatars.discourse-cdn.com/v4/letter/m/bbe5ce/32.png) [@MrBug](https://meta.discourse.org/u/MrBug)
#### Post date: [14 juni 2024 om 14:15 UTC](https://meta.discourse.org/t/custom-route-not-being-indexed-appearing-in-crawler-view/309403/6 "2024-06-14T14:15:44Z")

</div>

Why are you showing me that? ^^  
I was asking about the [Creating Routes in Discourse and Showing Data](https://meta.discourse.org/t/creating-routes-in-discourse-and-showing-data/48827) tutorial…  
I followed it  
I have a route  
I have data: `{ name: "donut", description: "delicious!" }`  
The route reads json and shows that data

How to get that same data, to the crawler page?

How does another version of static page plugin helps me with that? ^^ There is a number of static page plugins out there, mostly dead and abandoned. So… yay… another one…

I found a topic with the same question, [How to transfer data from plugin to app/views templates?](https://meta.discourse.org/t/how-to-transfer-data-from-plugin-to-app-views-templates/81528)  
And noone helped him either ^^  
And it seems the guy solution was to stop using discourse ^^

Is that the only “real” solution? 🙂

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [14 juni 2024 om 14:55 UTC](https://meta.discourse.org/t/custom-route-not-being-indexed-appearing-in-crawler-view/309403/7 "2024-06-14T14:55:54Z")

</div>

It’s a plugin for Discourse which ultimately renders back-end templates which are exposed to crawlers and have their own routes, that’s the reason. Perhaps you could:

1. use it
2. adapt it for your needs?

Thinking about it, you’re best to check out the vanilla plugin, without the extensions:

> [@Landing Pages Plugin small\_airplane](https://meta.discourse.org/t/landing-pages-plugin/180967):
>
> The Landing Pages Plugin lets you make standalone landing pages for your Discourse instance. You can display topics, users and other content from your forum. You can restrict pages to groups, apply Discourse themes, set custom paths, and manage pages in a dedicated git repository. [[Screen Shot 2021-02-23 at 6.11.10 PM]](https://thepavilion.io/welcome)desktop_computer[Get the code](https://github.com/paviliondev/discourse-landing-pages)page_facing_up [Read the documentation](https://coop.pavilion.tech/docs?category=130)raising_hand_woman [Request a feature](https://coop.pavilion.tech/c/support/discourse-landing-pages/131)bug [Report a bug](https://coop.pavilion.tech/c/support/discourse-landing-pages/131) Not sure how to install a plugin? [Follow t…](https://meta.discourse.org/t/install-plugins-in-discourse/19157)

But as you please.

---

<div class="post-metadata">

### Author: ![MrBug](https://avatars.discourse-cdn.com/v4/letter/m/bbe5ce/32.png) [@MrBug](https://meta.discourse.org/u/MrBug)
#### Post date: [14 juni 2024 om 16:29 UTC](https://meta.discourse.org/t/custom-route-not-being-indexed-appearing-in-crawler-view/309403/8 "2024-06-14T16:29:24Z")

</div>

So you clearly know how to do it…  
Cant you just show how to do it? ^^

Like “to make donut delicious! appear on crawler page too, add this tiny line of code to this specific file”…  
Done…

Or its illegal to help here? ^^  
If its too complex or hackish and needs 20 new files created with hundreds and hundreds lines of unreadable garbage code, then sure, might be reasonable to go with alternative solutions… ^^

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [1 juli 2024 om 13:13 UTC](https://meta.discourse.org/t/custom-route-not-being-indexed-appearing-in-crawler-view/309403/9 "2024-07-01T13:13:23Z")

</div>



---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [2 juli 2024 om 12:38 UTC](https://meta.discourse.org/t/custom-route-not-being-indexed-appearing-in-crawler-view/309403/11 "2024-07-02T12:38:37Z")

</div>

Hi @MrBug 🙂

I’m sorry you’re not getting the answers you were hoping for, but after reviewing this topic the tone of your posts has become increasingly out of character with what we expect here on meta. If you’d like to continue participating could you please remember to have some respect for those who are contributing their time and effort to help people with their issues.

I’m going to close this topic off now.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [2 juli 2024 om 12:38 UTC](https://meta.discourse.org/t/custom-route-not-being-indexed-appearing-in-crawler-view/309403/12 "2024-07-02T12:38:42Z")

</div>


