I really like the new multipage functionality in streamlit… but I cannot avoid being repulsed by the method used to add a icon to each app/section.
Adding and emoji to the file name simply to be able to add an icon to the page seems at best a ugly hack.
Surely there must be a more elegant way to do this, for example
Why not make a requirement for every page in a multipage app (the python files within the pages folder) to have a st.set_page_config element
If this is technicaly difficult because you would need to read in each app first before drawing the UI then it would be better to make the definition of the multipage app on the main app itself
for example create a multipage app element that can take in 1 or more args where each arg is a multipage_config element
each multipage_config element contains all the metadata you need to include
and the multiapp element is responsible for drawing the UI as well as maybe even allow the return data for that element be a link we can add in the main page content:
The Streamlit team is considering different ways to improve this behavior, and make it easier to customize the appearance of the multipage sidebar without the need to change the filenames. In the meantime, you might try out GitHub - blackary/st_pages: An experimental version of Streamlit Multi-Page Apps, which I created for exactly this purpose.