Skip to content

Commit ba69f36

Browse files
committed
Serve documentation application on /docs
1 parent 6748fae commit ba69f36

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

main.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,21 @@
6868
def serve_vue_app(filename):
6969
"""
7070
Serve (a build of) the new Vue application
71-
"dist" is the output of `npm run build` from the 'vue-app 'repository
71+
"dist" is the output of `npm run build` from the 'vue-app' repository
7272
"""
7373
return send_from_directory('dist', filename)
7474

75+
@app.route('/docs/<path:filename')
76+
def serve_docs_app
77+
"""
78+
Serve (a build of) the documentation
79+
'cb_docs' is the output of `npx vuepress build pages/`
80+
from the 'docs' repository
81+
"""
82+
return send_from_directory('cb_docs', filename)
83+
7584
@app.route('/')
7685
def redirect_vue_app():
77-
7886
return redirect('/vue/index.html', code=302)
7987

8088
## Legacy API and web application

0 commit comments

Comments
 (0)