Configure GitHub Online Demo

Source: Internet
Author: User

Projects hosted on GitHub, if you want to see the effect directly, rather than download the code to compile, and do not want to spend a lot of effort to build the site, you can use some methods to achieve this goal. The methods described below are simple and practical, and the pro-test is effective.

method One:

Add htmlpreview.github.io/to the address of the HTML file, and you can see the effect by jumping to the address. Share the address to others, click the link to jump to the page you want to show. such as http://htmlpreview.github.io/?https://github.com/ednahlili/slideshow/blob/master/lunbo.html. The principle is that as long as the HTML file address in GitHub is entered, the htmlpreview.github.io/Web page can be compiled online to show the effect.



Method Two:

1. Open the warehouse page that already has the good code, click the "Setting" button,




2. Find the GitHub Pages section and select Source as "Master Branch".




3. Click "Save" to save the selection, the page automatically refreshes, a new link appears. Alternatively, you can select a theme in the second step, and the source is set automatically after the theme is saved, as well as others.




4. Click the link, add the name of the HTML file after the link, the demo is set up. Just click on this link later, you can jump to the demo page. such as https://ednahlili.github.io/slideshow/lunbo.html




Note:

1. The premise of both approaches is that you have the code you need on your browser's GitHub home page.

2. Be aware of the relative paths of CSS, images, JS, and other files.

3. When set up, the "Insight" option next to "setting" will show you the access of your demo.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.