Asset Loading Issue in Azure Static Web Apps with MkDocs-Material Sites in Subdirectories #7898
-
I'm hosting a static site on Azure Static Web Apps, built using MkDocs-Material. The site contains a main landing page and multiple sub-sites (each built individually using mkdocs) located in subdirectories (e.g., Here's the structure of the deployed site:
ProblemWhile the main landing page loads correctly, sub-site pages fail to load their CSS and JavaScript and the navigation doesn't work properly in the sub-sites either. The browser tries to load the assets from the subdirectory of the current page (e.g., Debugging Insights
QuestionHow can I configure MkDocs and Azure Static Web Apps so that sub-site pages correctly load their assets (CSS, JS) without attempting to fetch them relative to the current page? Is there a specific MkDocs or Azure Static Web Apps configuration I might be missing? Any insights or similar experiences would be greatly appreciated! Or if it is even possible to host a structure like this (where we have a top level site as well as sub-sites built separately as sub-folders which will be linked as paths to the domain) as a static web app? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Exact duplicate of Azure/static-web-apps#1603. This is, in fact, a double post, which violates our contributing guidelines:
You're making more work for everyone. Please don't do that. |
Beta Was this translation helpful? Give feedback.
You have published the same post on different forums without informing the relevant parties about it, so there was no bridging. While I admit that your post looks well researched etc., instead of taking up space on both forums at the same time you should wait for instructions from one party before going to the next. Even now, someone on their discussion board might b…