Customized Pages Directory

Hi All,

Just wanted to ask if there’s a possible way on removing the pages directory in the sidebar without using any CSS to remove this or modify the pages directory. Based on this last year post (I upgraded my streamlit version and now contents of my pages folder show up in the side bar), it mentioned that this is due to the multipage app feature and suggested to change the page folder name to other name other than “Pages” since it is a default directory.

I tried to change the directory from pages to content. However, it gives me Page Not Found: You have requested page /national, but no corresponding file was found in the app’s pages/ directory. Running the app’s main page. Although, based on the mentioned concern above is pages is the default folder but for these files not to appear on the sidebar, I should change the folder name but it is not working.

Hope you can help me on this matter.

Thank you.

If you rename the folder, make sure you rename all references to it as well.

Also, if you rename it while the app is running, Streamlit might have an issue and you may need to reboot the app.

Finally, there is a optional add-on for controlling the pages that show up in navigation if you would like to explore st-pages

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.