# Serving large amounts of static HTML using discourse?

**URL:** <https://meta.discourse.org/t/serving-large-amounts-of-static-html-using-discourse/68083>\
**Category:** Development\
**Created:** [15 أغسطس 2017، 2:43م UTC](https://meta.discourse.org/t/serving-large-amounts-of-static-html-using-discourse/68083 "2017-08-15T14:43:17Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Bas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bas/32/294929_2.png) [@Bas](https://meta.discourse.org/u/Bas)\
**Post date:** [15 أغسطس 2017، 2:43م UTC](https://meta.discourse.org/t/serving-large-amounts-of-static-html-using-discourse/68083/1 "2017-08-15T14:43:17Z")

</div>

Hi,

Currently we have a few thousand pages of documentation in static HTML files. We need a place to store this and render them.  
Our initial instinct was to use wordpress and use a mass-import; then link discourse and wordpress using the plugin etc.

But… we kind of had a brainwave.. **what if we used Discourse to serve these files?**

We dump the HTML files in a folder and write a bit of Ruby to fetch the correct `<div>` from the html file and render it in a Handlebar template.

This would have several advantages:

- No need for extensive SSO (some documents will only be visible to certain discourse-groups / TLs), we’ll have access to the Discourse users out of the box
- Consistent look and feel, since we can render the Discourse menu on top etc. A single CSS file can be used.
- A single URL, keeps everything nice and clean
- It’s faster than Wordpress
- one tech stack, just Ember/RoR; no added PHP knowledge required

Some downsides I can foresee:

- prone to breaking, means we’ll have to properly test our solution with every Discourse release
- bad for SEO, this is fine, we’re behind a login anyway

I’d love to hear if this is a terribly bad idea 🙂 Otherwise I’ll see if I can turn this into a plugin of sorts.

Something like this:

```handlebars
{{plugin-outlet name="above-site-header"}}
{{site-header canSignUp=canSignUp
              showCreateAccount=(route-action "showCreateAccount")
              showLogin=(route-action "showLogin")
              showKeyboard=(route-action "showKeyboardShortcutsHelp")
              toggleMobileView=(route-action "toggleMobileView")
              toggleAnonymous=(route-action "toggleAnonymous")
              logout=(route-action "logout")}}
{{plugin-outlet name="below-site-header"}}

<div id="main-outlet" class="wrap">
  <h1>html goes here</h1>
</div>

{{plugin-outlet name="above-footer" args=(hash showFooter=showFooter)}}
{{#if showFooter}}
  {{custom-html name="footer"}}
{{/if}}
{{plugin-outlet name="below-footer" args=(hash showFooter=showFooter)}}

{{outlet "modal"}}
{{topic-entrance}}
{{outlet "composer"}}

```

 ![09](https://global.discourse-cdn.com/meta/original/3X/6/5/6526f48abde8ba0d44d824f3c05c84519e373183.png)

---

_[View the full topic](https://meta.discourse.org/t/serving-large-amounts-of-static-html-using-discourse/68083)._
