How to see an HTML page on Github as a normal rendered HTML page to see preview in browser, without downloading?

后端 未结 10 946
情歌与酒
情歌与酒 2020-11-30 15:55

On http://github.com developer keep the HTML, CSS, JavaScript and images files of the project. How can I see the HTML output in browser?

For example this: https://gi

10条回答
  •  醉梦人生
    2020-11-30 16:52

    If you don't want to download an archive you can use GitHub Pages to render this.

    1. Fork the repository to your account.
    2. Clone it locally on your machine
    3. Create a gh-pages branch (if one already exists, remove it and create a new one based off master).
    4. Push the branch back to GitHub.
    5. View the pages at http://username.github.io/repo`

    In code:

    git clone git@github.com:username/repo.git
    cd repo
    git branch gh-pages
    # Might need to do this first: git branch -D gh-pages
    git push -u origin gh-pages # Push the new branch back to github
    Go to http://username.github.io/repo
    

提交回复
热议问题