# Single page application for docs using Discourse API

**URL:** https://meta.discourse.org/t/single-page-application-for-docs-using-discourse-api/48380
**Category:** Feature
**Created:** [March 9, 2016, 8:20pm UTC](https://meta.discourse.org/t/single-page-application-for-docs-using-discourse-api/48380 "2016-03-09T20:20:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![erlend\_sh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erlend_sh/32/119475_2.png) [@erlend\_sh](https://meta.discourse.org/u/erlend_sh)
#### Post date: [March 9, 2016, 8:20pm UTC](https://meta.discourse.org/t/single-page-application-for-docs-using-discourse-api/48380/1 "2016-03-09T20:20:16Z")

</div>

Continuing discussion from [here](https://meta.discourse.org/t/want-my-forum-to-have-a-default-view-like-my-forum-search/40570).

The v1 I had in mind for this was actually a lightweight single page application (i.e. [docs.discourse.org](http://docs.discourse.org)) interfacing with the Discourse API, which would open links in a new window ([meta.discourse.org](http://meta.discourse.org)). That way it’d be easier to style it to taste. But I suppose it might be roughly the same amount of work as a Discourse plugin.

I haven’t had the chance to clean up my ideas yet, but here’s a mockup I was fiddling with:

 ![](https://global.discourse-cdn.com/meta/original/3X/e/d/ed5c630eeab050eaa6caee60747b723424c1af1e.png)

 ![](https://global.discourse-cdn.com/meta/original/3X/f/0/f028f9ff813abd63d3dbbe66a8e805ca92ae7cb3.png)

It has 3 components to it:

### Top pages

**Top pages on forum**

An widget populated with the top pages, based on Most Read or same algorithm as Top.

**External pages**

Dedicated space for blog posts or 3rd party articles that are recommended reading.

### Sitemap

List all the pages of a specified category, sectioned by tags. Essentially an automated version of what I demonstrated in the [Meta docs TOC](https://meta.discourse.org/t/meta-documentation-table-of-contents/32240).

### Search

Default search to a specified category, but let the user toggle between category-specifc and global search.

---

<div class="post-metadata">

### Author: ![erlend\_sh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erlend_sh/32/119475_2.png) [@erlend\_sh](https://meta.discourse.org/u/erlend_sh)
#### Post date: [March 18, 2016, 2:09pm UTC](https://meta.discourse.org/t/single-page-application-for-docs-using-discourse-api/48380/2 "2016-03-18T14:09:03Z")

</div>

New Relic has a pretty slick implementation of this. They’ve created a site-wide [newrelic.com](http://newrelic.com) search. Try search “database” for instance and see what comes up:

> **[Forums](https://support.newrelic.com/s/)**

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [March 18, 2016, 2:43pm UTC](https://meta.discourse.org/t/single-page-application-for-docs-using-discourse-api/48380/3 "2016-03-18T14:43:44Z")

</div>

Very nice!

I’m doing this too, on our intranet app (Scala + Play Framework). The search API is more than enough to allow such tight integration. Discourse is already part of the whole app.
