Git

How to create GitHub page

GitHub User Page

Login to your GitHub account and create a project name your project to yourusername.github.io (if you are creating a page for a group change project name to yourgroupname.github.io ).

create

Create a project and commit it

Follow the folder structure

folder github structure

<!DOCTYPE html>
<html>
<head>
  <link rel="stylesheet" href="css/main.css">
</head>
<body>

<h1>This is a heading</h1>
<p>This is a paragraph.</p>

</body>
</html>
h1{
	color: red;
}

commit and push the code to GitHub it will automatically build.

if you are using command line

cd existing_folder
git init
git add .
git commit -m "first commit"
git remote add origin https://github.com/your github repo url .github.io.git
git push -u origin master

After push open your page in web browser

http://yourusername.github.io

Tadaa …. !

github page

what is the benefit of creating page in github.io

  1. You can host a website
  2. You can showcase your open source projects
  3. You can create a good portfolio

etc

 

Ref : https://pages.github.com/

 

Click here to know How to create a GitLab Page

By bm on June 2, 2016 | Git | A comment?

How to create GitLab Pages

GitLab User Page

Login to your GitLab and create a project  name your project to yourusername.gitlab.io (if you are creating a page for a  group  change project name to  yourgroupname.gitlab.io ).

Capture

Create a project and commit it

Follow the folder structure

folder structure

<!DOCTYPE html>
<html>
<head>
  <link rel="stylesheet" href="css/main.css">
</head>
<body>

<h1>This is a heading</h1>
<p>This is a paragraph.</p>

</body>
</html>
h1{
	color: red;
}
pages:
  stage: deploy
  script:
  - mkdir .public
  - cp -r * .public
  - mv .public public
  artifacts:
    paths:
    - public
  only:
  - master

commit and push the code to GitLab it will automatically build.

if you are using command line

cd existing_folder
git init
git remote add origin https://gitlab.com/your repository url.git
git add .
git commit
git push -u origin master

You can see the build result in build menu

build

After build successfully completed, open your page using

http://yourusername.gitlab.io

Tadaa …. !

gitlab page

 

what is the benefit of creating page in gitlab.io

  1. You can host a website
  2. You can showcase your open source projects
  3. You can create a good portfolio

etc

 

Ref : http://docs.gitlab.com/ee/pages/README.html

 

Click here to know How to create a GitHub Page

By bm on | Git | A comment?