willsonlincake 发表于 2022-4-11 21:03:20

CherryPy静态页面

不晓得怎样部署到Github Pages
import os
import cherrypy

PATH = os.path.abspath(os.path.dirname(__file__))
class Root(object): pass

cherrypy.tree.mount(Root(), '/', config={
      '/': {
                'tools.staticdir.on': True,
                'tools.staticdir.dir': PATH,
                'tools.staticdir.index': 'index.html',
            },
    })

cherrypy.quickstart()
页: [1]
查看完整版本: CherryPy静态页面