XP-Dev.com Documentation

Direct File Hosting

What is Direct File Hosting ?

Direct File Hosting is a simple mechanism to publish a repository as a regular website.

You can even use Jekyll as a static site generator and templating engine.

When enabled, each XP-Dev.com repositories will be published as a website in on http://<repository-name>.xpdev-hosted.com.

For e.g. the repository called code-project will be published as http://code-project.xpdev-hosted.com

The advantages over traditional web site hosting are:

  • Keep your whole website revisioned under Subversion
  • Allow any number of people/collaborators to update the website
  • Make changes from anywhere (you'll need a Subversion client installed)
  • Use Jekyll to publish your website and avoid writing HTML and repetitive templating code
  • Whenever you commit any changes to the Subversion repository, it will automatically be reflected on the published website.

The only disadvantage is that it only supports static web sites (i.e. no scripting is supported other than Jekyll).

Disclaimer (Very Important!)

All Direct File Hosting enabled repositories are published on the public internet. Please do not enable it if your repository contains data that you don't want internet viewers to visit.

Enabling Direct File Hosting

Enabling direct file hosting can be done in a few easy steps:

Edit repository

  • Turn on the box next to Enable Direct File Hosting.
  • Click on Save and it should be turned on almost instantaneously.

Enable Direct File Hosting

  • Your default website domain name will be displayed under your project's Repository tab, followed by the repository itself:


DFH Domain

Check-in a New Website

Start with checking out the repository. The example below uses a Git repository, but you're free to use any repository type.

$ git clone ssh://xp-dev.com/code-project
Cloning into ‘code-project'…
warning: You appear to have cloned an empty repository.

Check in some content:

$ cd code-project/
$ git add index.html

$ git commit ~~m "initial welcome page"
 home page
 0 files changed
 create mode 100644 index.html

$ git push origin master
Counting objects: 3, done.
Writing objects: 100% , 203 bytes, done.
Total 3 , reused 0 
To ssh://xp-dev.com/code-project
* master -> master

Go visit http://code-project.xpdev-hosted.com/ and have a look at the web page that has just been checked in.

At this point, any other changes (commits, pushes) that are made to the repository will be reflected immediately on the website.

Mapping a Domain

Once you have enabled Direct File Hosting on your repository, click on Map a New Domain

Map Domain

  • Enter the fully qualified domain name that you wish to host on XP-Dev.com
  • Click on Save

Add Domain

There is one final step you need to perform to ensure that your mapped domain works perfectly. You will need to point your domain that you used above to XP-Dev.com servers. This is usually done via your Domain Name Server provider (most of the time its where you have registered your domain).

  • You can either:
    • Add a CNAME record and point it to your <repository-name>.xpdev-hosted.com subdomain, or
    • Add a A record and point it to the IP Address

Using Jekyll with XP-Dev.com Direct File Hosting

Nothing needs to be done to your repository settings to be able to use Jekyll. All repositories are enabled with Jekyll.

All you have to ensure is that your repository contents is what Jekyll's expects it to be.

Feel free to contact us if you need any assistance.