Is there a way to integrate gitbook and sharepoint cleanly? - sharepoint

I have several books in Gitbook and am bouncing users from the Sharepoint based intranet to documentation in Gitbook. Is there a way to automatically embed the Gitbook content into Sharepoint so it looks like it is integrated within the intranet?

I have successfully integrated Gitbook into Sharepoint. Initially I tried the answer provided above, but that rendered my gitbook inside a window within Sharepoint which looked bad to me.
Here is the way I accomplished it:
Using the Gitbook CLI Toolchain installed on a linux computer, issue the gitbook build command.
Take the output from this command, which is a folder called _book, and upload its contents to your Sharepoint documents folder.
Take care to replicate the folder structure exactly. This is a bit tedious since Sharepoint doesn't allow you to upload folders (at least not my instance).
Rename every .html document in the _book folder to .aspx. This allows Users to visit a page when they click a link rather than downloading the page. If i'm not mistaken, I also had to edit the links to my books pages inside the index.aspx page from .html to .aspx as well.
Here comes the cool part... visit the link provided for the (now) index.aspx. Get the link by clicking the ... button next to the file in Sharepoint. And...bingo, Sharepoint will serve your entire gitbook as a static site.
Hope this helps

Related

How do I programmatically add pages to a wiki library in Sharepoint?

My first question on stackoverflow, I hope I am following the rules.
Anyhow, as the title suggests, I need to figure out how to programmatically add pages to a wiki library. I set up upwards of 30,000 rows in Excel, VBA'd them into txt files containing html that portray articles, and now they are sitting in a folder with nowhere to go. They need to go into a wiki library on SharePoint, where they will be referenced by users in their articles. Two parts:
On single-file upload, cannot upload aspx files. I upload as txt or html and it goes fine. Then I try to change them to aspx. Illegal.
Cannot upload more than one file at a time. Once I figure out #1, this will be an issue.
I assumed there must be a way to mimic whatever the "wikification" process is for files programmatically. Microsoft's how-to on file uploading requires a Sharepoint Project, which requires VS Professional and running SharePoint locally. Neither of these is practical.
Thank you and godspeed.
You could write a small Powershell Script or Commandline application for example in C# or VB. Copy your files to the server and execute your script/app on the SharePoint server. Connect to your SharePoint like the following:
using Microsoft.SharePoint;
...
SPSite site = new SPSite("mysiteurl");
SPWeb web = site.OpenWeb();
// your code goes here
web.dispose();
site.dispose();
...
Then get the directory programmatically where your files reside.
If this was successful, loop through all files in your folder and upload them programmatically to the WIKI Library.
Sound complex, but if you search for the single topics, you will find a lot of solutions/code out there.
You could also write a Console Application which can connect remotely to the SharePoint Server without the need to be executed on the SharePoint itself. In this case you would need to use the Client Object Model (CSOM).
The Office 365 Patterns and Practices site is a great reference. It has a comprehensive sample for creating wiki pages using CSOM here

Downloading all folders and its contents(files) from a website and uploading to another site?

I am working on a problem where I have to login to a website (through a form on the webpage), which has many folders displayed on the page and these folders contains many files under them.DO I understand correctly that these folders are not same as folders present on our PC which has a physical location? These folders on the website are just a link which opens a list of files upon clicking.
So, I am struggling to write a code which can login to the site and download all folders and the contents(files) and arrange it in same fashion on the PC in the same hierarchy in which it is arranged in the website. I am thinking about using httpwebrequest for logging in the site, but I have no idea how to download the folders and the contents in the same form as in website.
can anyone help me to develop the code?? I am using C# as my language with .net 4.0
Before thinking about reinventing the wheel, why not ask your hosting provider about ftp access to the site. If you have that then problem solved ... use one of the numerous ftp clients to download all the website content in one click.
Good luck

can I create a project from my web site url

I am just starting with Aptana and I don't have the original HTML files for my web site. Is there a way that I can import my whole web site as a project or do I have to open each page from with Aptana and save with the original urls?
Thanks
I use Interachy which is a commercial Mac option. One open source Windows program is HTTrack.
If your site isn't large, it's often feasible to go through page by page and save each one as source. You also need to save all the images and CSS files, and reconstruct the folder directories, though it's goes faster than you might think.
Good luck!

Kentico Not Showing Added Pages from Visual Studio 2010

I am working with Kentico in Visual Studios (web project) on my local computer. When I add folders or files to the solution and then run it in the browser, the pages do not show up in the CMS desk or site manager. Am I creating these folders/files in the wrong place in the solution (ex: {directory of web project}/CMSPages/filename.aspx)? Or maybe have incorrect settings?
This is not the way how it works - the system has no idea about your pages if you place them on the file system. However, you can create ASPX page templates and then use then for the documents. Please see the Devnet forum
Best regards,
Juraj Ondrus
Where Do you want to use this page?
In the visitor sites or CMS Page
If you want to use visitor site you can create a webpart and add you webpart to the Page create on content tree.
If you want to use in the cmsdesk the you need to register your page in the module

SharePoint 2010 site template with a form library - the form template contains site URL

I am working on a site template that will be used to create hundreds of sites for different org units. The site should contain a form library, with an InfoPath form template.
My question is - is it possible to create a template and let power users create sites, without any administrator or developer involvement? If not - what's the easiest alternative?
The problem is that the form template contains the site URL and I don't know if this can be avoided. As a consequence, when a site is created and a form submitted - it ends up in the library of the original site.
I have created a handful of sites for the pilot project and what I've been doing so far is to uncab the XSN file, edit the URL manually, repackage into XSN and publish to the new library. This works, but involves a manual step in the site creation process that I wish to avoid. Here are the lines I'm editing:
<xsf:submit caption="Submit" disableMenuItem="no" onAfterSubmit="close" showStatusDialog="no">
<xsf:davAdapter name="SharePoint Library Submit" submitAllowed="yes" overwriteAllowed="no">
<xsf:folderURL value="http://my_farm_url/subsite1/form_lib"
Also here:
<xsf2:solutionPropertiesExtension branch="wss">
<xsf2:wss path="http://my_farm_url/subsite1/form_lib"
I'm changing subsite1 to subsite2.
I tried to set a relative URL, first to the submit element, then to both, to no avail. The form was being rendered (in browser), the submit worked (no errors) but then the submitted form was not in the library. Looking further into this, the forms ended up being submitted to a form library on the root site - http://my_farm_url/form_lib! It makes sense when you think about it, that's where a relative url of form_lib takes you to, from the site, from the root site perspective.
For the moment the only solution I envision is to create a tool that will help users create sites based on the template, fixing the XSN behind the curtains. I don't know how to publish a form template programmatically but it should be possible. Apart from this unknown, it's also not very automated and I'll be very happy if a proper solution is possible that will work with SharePoint/InfoPath tools only.
You need to schedule a EventReceiver there is no way to do it for configuration.
In EventReceiver you have to read the file "Manifest.xsf", update the XML node is defined where the url and save the file "Manifest.xsf".
To read the XML node is necessary to use System.Xml.dll

Resources