We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fd2d52e commit 06bd403Copy full SHA for 06bd403
1 file changed
main.py
@@ -72,14 +72,22 @@ def serve_vue_app(filename):
72
"""
73
return send_from_directory('dist', filename)
74
75
-@app.route('/docs/<path:filename>')
76
-def serve_docs_app(filename):
+@app.route('/docs/')
+def redirect_docs_app():
77
+ return redirect('/docs/index.html', code=302)
78
+
79
+@app.route('/docs/<path:subpath>')
80
+def serve_docs_app(subpath):
81
82
Serve (a build of) the documentation
83
'cb_docs' is the output of `npx vuepress build pages/`
84
from the 'docs' repository
85
- return send_from_directory('cb_docs', filename)
86
+ print("Running docs path")
87
+ print(subpath)
88
+ if (subpath[-1] == '/'):
89
+ subpath = subpath + 'index.html'
90
+ return send_from_directory('cb_docs', subpath)
91
92
@app.route('/')
93
def redirect_vue_app():
0 commit comments