File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -72,14 +72,22 @@ def serve_vue_app(filename):
72
72
"""
73
73
return send_from_directory ('dist' , filename )
74
74
75
- @app .route ('/docs/<path:filename>' )
76
- def serve_docs_app (filename ):
75
+ @app .route ('/docs/' )
76
+ 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 ):
77
81
"""
78
82
Serve (a build of) the documentation
79
83
'cb_docs' is the output of `npx vuepress build pages/`
80
84
from the 'docs' repository
81
85
"""
82
- 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 )
83
91
84
92
@app .route ('/' )
85
93
def redirect_vue_app ():
You can’t perform that action at this time.
0 commit comments