Sphinx documentation inside a Flask running web application

后端 未结 4 1783
隐瞒了意图╮
隐瞒了意图╮ 2021-02-13 04:40

I\'ve locally built static Sphinx documentations (using make html).

I wish now to integrate the Sphinx files into my webapp that runs with Flask. From the

4条回答
  •  花落未央
    2021-02-13 04:51

    You could just handle it with your web server, the same way you handle the /static directory in Flask. For example if you used Apache as your production web server, you might add

    Alias /documentation /location/of/sphinx/html
    
        Order deny,allow
        Allow from all
    
    

    to your Apache site configuration, so then you could just link directly to http://yoursite.com/documentation to access the Sphinx files, avoiding Flask altogether.

提交回复
热议问题