DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Build a GitHub Slack Bot With AWS Bedrock and MCP, Part 1
  • Stop Poisoning Your Models: How I Built a CV Dataset Quality Toolkit I Can Reuse Forever
  • CI/CD Integration: Running Playwright on GitHub Actions: The Definitive Automation Blueprint
  • Chat with Your Oracle Database: SQLcl MCP + GitHub Copilot

Trending

  • Feature Flag Debt: Performance Impact in Enterprise Applications
  • GenAI Implementation Isn't Magic — It’s a Lifecycle
  • Why Stable RAG Answers Can Still Hide Unstable Evidence
  • Jakarta EE 12: Entering the Data Age of Enterprise Java
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Deployment
  4. How to Run HTML files in your Browser from GitHub

How to Run HTML files in your Browser from GitHub

By 
Michael Crump user avatar
Michael Crump
·
Sep. 10, 14 · Interview
Likes (0)
Comment
Save
Tweet
Share
11.2K Views

Join the DZone community and get the full member experience.

Join For Free

if you have a .html file in a github repository and want to view that page directly, you would typically download or clone the repo to your local hard drive and run it from there.

there is an easier way

simply navigate to the repo in your github account that contains a html file as shown below:

image

right-click the index.html file and select copy link address.

image

you should have a url similar to the following structure:

https://github.com/<your user name>/<your repo>/blob/master/index.html

enter rawgit.com

as the name implies, rawgit shows serves the raw files directly from github.

to use it simply use the following format:

https://rawgit.com/<your user name>/<your repo>/master/index.html

if you want to use it in production, you can use:

https://cdn.rawgit.com/<your user name>/<your repo>/master/index.html

that was easy now, wasn’t it!

HTML GitHub

Published at DZone with permission of Michael Crump. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Build a GitHub Slack Bot With AWS Bedrock and MCP, Part 1
  • Stop Poisoning Your Models: How I Built a CV Dataset Quality Toolkit I Can Reuse Forever
  • CI/CD Integration: Running Playwright on GitHub Actions: The Definitive Automation Blueprint
  • Chat with Your Oracle Database: SQLcl MCP + GitHub Copilot

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook