I can create a file called TestAspx.aspx in Notepad with the following content:

    This is <b>Awesome!</b>

I can then upload it to my SharePoint site:

Add-PnPFile -Folder /product/development/repos/Pages -Path .\TestAspx.aspx

If I then go to /Pages/TestAspx.aspx, I'll see my page in HTML.

However, if I wanted to display the standard site navigation and menu bars around my content, is there a way to do that? I guess I'm asking how to apply the default master page to my page. Basically, I just want to provide HTML content and have SharePoint take care of everything else.

  • Which version of SharePoint are you using? Feb 1, 2022 at 14:07
  • @CallumCrowley This is ****.sharepoint.com, using Office 365. Feb 1, 2022 at 17:08
  • Do you wish to use classic or modern SharePoint? Feb 1, 2022 at 17:19
  • Since I own the subsite, I think I can do either one.. I don't know the difference between the two. As long as I can host HTML content I'm happy. Feb 1, 2022 at 21:02
  • Rather than upload a custom page and force SharePoint onto it, could you benefit from creating a new page (Add-PnPPage) then adding a webpart and/or content to that page? This way, you keep things cleaner and functioning within the SPO space.
    – piercove
    Feb 8, 2022 at 0:58


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.