Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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 geneated 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.

share|improve this question
add comment

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)
{
   $webapp.AllowedInlineDownloadedMimeTypes.Add($mimetype)
   $webapp.Update()
}

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.

share|improve this answer
add comment

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.

share|improve this answer
    
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. –  Jarrod Roberson Jul 29 '13 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 '13 at 18:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.