chainlit icon indicating copy to clipboard operation
chainlit copied to clipboard

Jinja2 index template

Open dokterbob opened this issue 1 year ago • 1 comments

Jinja2 (rather than custom template) in index view. Would allow future overrides of headers, including arbitrary JS and meta tags (analytics, ads, Twitter cards, whatever) which we'll submit as a second patch.

The patch assumes #1192 and #1191 and #1197 are dealt with in order to be able to consistently test.

We're still testing this, the draft is here to facilitate open conversation.

Right now, the backend reads a file from the frontend folder and the index.html from the frontend is not valid HTML anymore.

Question to the maintainer: should we keep a default index.html in the frontend (as valid HTML), then have a Jinja2 template in the backend which allows overrides?

Many creds to @dhruvsyos who did the heavy lifting on this one.

dokterbob avatar Aug 08 '24 10:08 dokterbob