Can we push for a solution to this soon or possibly integrate this as a newly customizable feature through something simple like modifying the .TOML file instead of editing the streamlit index.html file? This might not be as easy for people like myself who are using 3rd party hosting such as Heroku.
Maybe just offering the path to an alternative index.html file to use as the template and adding the version number somewhere in the existing index.html file to be sure we are aligned.
There is a parameter for config.toml -enableStaticServing - that might be useful too.
# Enable serving files from a `static` directory in the running app's
# directory.
# Default: false
enableStaticServing = false
Hi @shawngiese can you further elaborate this method? For my case, I am unable to modify the index.html file directly since I am deploying with Heroku.
Hi, I have not used the static serving parameter. The index.html file is in your folder of Python packages, under the streamlit folder. I use conda and virtural environments so my location is
C:\Users\me\miniconda3\envs\myvondaenvname\Lib\site-packages\streamlit\static
If you cannot change your own file, like with a sed command, then try the enableStaticServing parameter and see if you can overwrite the index.html file with that.
Unfortunately, attempts to manually modify the index.html
post Herokuâs dynamic installation of Streamlit (dynamic meaning it installs it from a requirements.txt
), do not persist or reflect in the deployed app.
I am unfamiliar with using the enableStaticServing parameter to overwrite the index.html file. How would I go about implementing that change?
Use this page configuration above all titles and markdown
st.set_page_config(
page_title=âyour titleâ,
page_icon=âicon pathâ,
layout=âwideâ, # or âcenteredâ
initial_sidebar_state=âautoâ # or âexpandedâ, âcollapsedâ
)