-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jinja2 index template #1196
Jinja2 index template #1196
Conversation
b6f23ee
to
2934913
Compare
Exciting! Can't wait for this to be approved and add tracking into my chainlit app with amplitude |
@willydouhard Curious to hear your opinion on the question from above, as it's a non-trivial design decision: 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? |
2934913
to
56a8769
Compare
Co-authored-by: dhruvsyos <[email protected]>
56a8769
to
c880032
Compare
Please don't review yet, I'd still like to add unit tests and think really well about where and how to place this index.html -- the current strategy seems rather inelegant. |
Any updates on this PR? |
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.
Right now, the backend reads a file from the frontend dist folder and the
index.html
from the frontend is not valid HTML anymore.Many creds to @dhruvsyos who did the heavy lifting on this one.