-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Labels
feature:st.set_page_configRelated to `st.set_page_config` commandRelated to `st.set_page_config` commandpriority:P3Medium priorityMedium prioritytype:bugSomething isn't working as expectedSomething isn't working as expected
Description
Checklist
- I have searched the existing issues for similar issues.
- I added a very descriptive title to this issue.
- I have provided sufficient information below to help reproduce this issue.
Summary
With an app that has multiple pages (pages/ directory), the set_page_config(page_icon='my_favicon.ico') only works on the base page. All other pages (everything in pages/) get a streamlit icon & title or no icon at all (world).
Reproducible Code Example
# this takes 2 files to reproduce...
# base_page.py is here:
import streamlit as st
st.set_page_config(page_title="Icon Test Main", page_icon='favicon.ico',
layout="wide", menu_items=None)
st.markdown("## Base Page")
# The second file (below) should be in a pages/ subdirectory
# pages/1_page1.py:
import streamlit as st
st.markdown("## Page 1")
# That's it! (you'll also need a favicon... mine is 48x48)Steps To Reproduce
- place a
favicon.icoin the directory with base_page.py (download viacurl -LO https://weka-repo-test.s3.us-west-2.amazonaws.com/favicon.ico- I can't upload it here. Or use your own) streamlit run base_page.py- click between the pages and observe the tab icon (page_icon) and page title
Expected Behavior
The page_title and page_icon settings made with set_page_config() should be globally applied to all pages.
Since set_page_config() can only be used in base_page.py, the settings should be global, but the page_title and page_icon don't get set in any sub-pages.
Current Behavior
page_title and page_icon are not set on sub-pages
Is this a regression?
- Yes, this used to work in a previous version.
Debug info
- Streamlit version: streamlit-1.21.0
- Python version: 3.11.3 and 3.8.12
- Operating System: Rocky Linux 8.6 and MacOS 12.3
- Browser: Chrome Version 112.0.5615.49 (Official Build) (arm64)
- Virtual environment: venv
Additional Information
Download favicon.ico from here: https://weka-repo-test.s3.us-west-2.amazonaws.com/favicon.ico
Are you willing to submit a PR?
- Yes, I am willing to submit a PR!
Metadata
Metadata
Assignees
Labels
feature:st.set_page_configRelated to `st.set_page_config` commandRelated to `st.set_page_config` commandpriority:P3Medium priorityMedium prioritytype:bugSomething isn't working as expectedSomething isn't working as expected