Skip to content

Commit

Permalink
Merge pull request juju#64 from anthonydillon/render-discourse-doc-ho…
Browse files Browse the repository at this point in the history
…mepage

Render the discourse content on the homepage of docs
  • Loading branch information
barrymcgee committed May 22, 2020
2 parents 8aafd61 + 75aa788 commit 73cddc7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 114 deletions.
96 changes: 0 additions & 96 deletions templates/docs/homepage.html

This file was deleted.

18 changes: 0 additions & 18 deletions webapp/docs/views.py
@@ -1,5 +1,3 @@
import flask

from canonicalwebteam.discourse_docs import (
DiscourseAPI,
DiscourseDocs,
Expand All @@ -25,22 +23,6 @@ def init_docs(app, url_prefix):

discourse_docs.init_app(app)

# Remove homepage route so we can redefine it
for url in app.url_map._rules:
if url.rule == url_prefix + "/":
app.url_map._rules.remove(url)

@app.route(url_prefix)
def homepage():
"""
Show the custom homepage
"""
discourse_parser.parse()

return flask.render_template(
"docs/homepage.html", navigation=discourse_parser.navigation
)

app.add_url_rule(
"/docs/search",
"docs-search",
Expand Down

0 comments on commit 73cddc7

Please sign in to comment.