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- 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- Review Atlassian: Publishing a Website on Bitbucket Cloud.
- Visit Bitbucket: Account Signin and log into Bitbucket.
- Select Repositories / Create repository.
- Enter
accountname.bitbucket.io
for the repository name, whereaccountname
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. - Select the option to make it a private repository.
- Select Git as the repository type.
- Create the repository.
Create a README
edit- Review Atlassian: Display README Text on the Overview.
- 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.
- Commit the change to create the README file.
- Observe the new front page for your repository.
- If desired, edit the README and commit additional changes now that you are able to see how the README will appear.
Create a File
editBitbucket 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.
- In your Bitbucket repository on the left, select
Source
. - On the right, select
+ New file
. - Enter
index.html
for the filename. - Enter anything you wish for the file content.
- Commit the change.
View the Page
edit- In a web browser, navigate to
https://accountname.bitbucket.io
to view your page. Be sure to replaceaccountname
with your Bitbucket account name.
Enhance Your Website
edit- Update your Bitbucket repository by editing index.html and adding web pages, CSS files, images, JavaScript, or other content as desired.