I am generating html from a build tool ( Maven 3 ) and I want to publish the entire site generated to a SharePoint 2010 server.

I can't find any documentation or options to upload an entire site of generated html and have SharePoint 2010 just serve it up for me.

This is documentation that will be built every time we do a release of our software and I would really like to have an automated way to publish the content as part of my release process.

I don't want to have any SharePoint specific templates or pages or anything else, I just want to be able to upload my HTML/CSS to a SharePoint site and have SharePoint publish un-molested.

The site pages will be generated on a Linux machine and will need to be published to SharePoint without any dependencies on SharePoint DLLs or the like.

Again, I just want to use SharePoint as plain web server.

I can code up a solution if needed, so programming to some API is not off the table.

2 Answers 2


I'll pre-fix this with that fact that I'm not a "Dev". But I have enough knowledge to be dangerous.

If these are static HTML pages, you can just add them to any document library and they will be rendered by SharePoint. If you want to automate the upload you can use PowerShell or even the REST API for SharePoint.

If you want to keep the SharePoint Chrome, then it gets more difficult. If that is the case, I would load them in a library and use an web page viewer web part to display a Wrapper page in that same library, and JavaScript to load the pages dynamically. If the generated links are all relative you can attach javascript action to the HREF that will load the content in the body of the current page instead of navigating directly to the page.

To render the HTML pages you will need to add the .htm or .html to the permitted file types. To do that you can change it in Central Administration (not recommended as it's all or nothing). Or the below PowerShell:

$mime = "text/html"
$webapp = Get-SPWebApplication "http://yourwebapp"
If ($webapp.AllowedInlineDownloadedMimeTypes -notcontains $mime)

another option is to utilize native .NET or .NET User Controls, and similar to javascript you can dynamically load in your HTML pages into the user control, it is just done server side. With this method you shouldn't have to change the SharePoint Mime handlers.


I am unsure if I understand this correctly, but your HTML design needs to be loaded up the SharePoint as templates, master pages with CSS and images.

At my workplace, we are currently doing a migration of design and we built the entire design in HTML, merged it with the master page with elements and added CSS.

Content, of course, was generated separately.

  • this isn't an answer; this isn't related to what I asked about, I need to just upload HTML to Sharepoint, and have Sharepoint just publish it, nothing else, the upload needs to be automated as well.
    – user18571
    Jul 29, 2013 at 17:56
  • Okay I probably misunderstood that bit.. Jesus Shelby's answer seems to be the one that could work for you then...
    – hemalshah
    Jul 29, 2013 at 18:08

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.