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):
7272 """
7373 return send_from_directory ('dist' , filename )
7474
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 ):
7781 """
7882 Serve (a build of) the documentation
7983 'cb_docs' is the output of `npx vuepress build pages/`
8084 from the 'docs' repository
8185 """
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 )
8391
8492@app .route ('/' )
8593def redirect_vue_app ():
You can’t perform that action at this time.
0 commit comments