Bitbucket/Website Hosting

Bitbucket supports free website hosting for static sites. This provides an opportunity to combine source code control and website hosting for learning HTML, CSS, and JavaScript.

Prerequisites

edit
  1. Complete the Bitbucket/Get Started tutorial to create a Bitbucket account and learn how to create a repository and add files.

Create a Repository

edit
  1. Review Atlassian: Publishing a Website on Bitbucket Cloud.
  2. Visit Bitbucket: Account Signin and log into Bitbucket.
  3. Select Repositories / Create repository.
  4. Enter accountname.bitbucket.io for the repository name, where accountname is your Bitbucket account name.
    Note: account names and repository names cannot contain special characters such as underscore (_) when using Bitbucket website hosting. If necessary, rename your account under Bitbucket settings before creating your repository.
  5. Select the option to make it a private repository.
  6. Select Git as the repository type.
  7. Create the repository.

Create a README

edit
  1. Review Atlassian: Display README Text on the Overview.
  2. Create a README for the new repository. The README may contain anything you like. Because it is a private repository, only you and users you invite will be able to see this repository.
  3. Commit the change to create the README file.
  4. Observe the new front page for your repository.
  5. If desired, edit the README and commit additional changes now that you are able to see how the README will appear.

Create a File

edit

Bitbucket repositories are typically managed using the git command line or a git utility. But it is also possible to edit content directly using the Bitbucket website.

  1. In your Bitbucket repository on the left, select Source.
  2. On the right, select + New file.
  3. Enter index.html for the filename.
  4. Enter anything you wish for the file content.
  5. Commit the change.

View the Page

edit
  1. In a web browser, navigate to https://accountname.bitbucket.io to view your page. Be sure to replace accountname with your Bitbucket account name.

Enhance Your Website

edit
  1. Update your Bitbucket repository by editing index.html and adding web pages, CSS files, images, JavaScript, or other content as desired.

See Also

edit