title: How do I programatically add an article page to a sharepoint site?
body: <p>I've been given the task of content migration from another CMS system to SharePoint 2010.</p>
  
  <p>The data in the old system is fairly easy to capture and the page hierarchy is simple so I'm not worried about that.</p>
  
  <p>However, I am completely <em>flummoxed</em> about how to even create a page in code.  I'm using the <code>Microsoft.SharePoint.Client</code> namespace as I do not have sharepoint installed on my system and am wanting to code this up as a console application and so I'm using I'm using <code>ClientContext</code>.  (On the other hand, I am willing to go into other solutions if necessary).  </p>
  
  <p><b>My end-game</b>: To get a page uploaded into some folder hierarchy which uses a master page, has the page title in a header web part, and a big ol' content-editable web part in the body so any user can come along and edit the content.</p>
  
  <p><b>Things I've tried so far</b>:</p>
  
  <ul><li>Using FileCollection.Add() to add an aspx file to the folder "Site Pages".  This renders the html in the browser but doesn't enable any features for the user to edit the page</li>
  <li>Using ListItemCollection.Add() to add a page to the site, but I didn't know what fields I needed.  Also I remember it came up with a runtime error saying I should use FileCollection.Add()</li>
  <li>Uploading to 'Site Pages' instead of 'Pages'</li>
  <li>So many others... ow my head :(</li>
  </ul>
  
  <p>The only plausible thing I can see on the net is to use the <code>PublishingPage</code> type along with <code>PublishingWeb</code>.  However, PublishingWeb can only be constructed from an SPWeb object which requires me to be actually hosting the sharepoint application on my workstation.</p>
  
  <p>If anyone can lend a hand that would be greatly appreciated :)</p>