Migrating my app to pages - referencing assets folder from pages

Hi @DrSmith69

Dash multi-page apps do not support a separate assets file for each page. However, you can find more information about how to have page related css in this thread: Add a css file to a page in Multipage app. Also, more info on how to include images: How to Embed Images into a Dash App

You could put the css in different files, but it would still apply to the whole app. The file structure might look something like:

- app.py 
- assets
    |-- page1.css
    |-- page2.css
    |-- page1.png
    |-- page2.png
- pages          
    |-- page1.py
    |-- page2.py
 
2 Likes