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
Newsletter
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Content Negotiation for AI Agents: Serving Markdown Beside Your HTML
  • Smarter GitHub Copilot Prompts for Java Microservices: From APIs to Production Tests
  • Python Asyncio: Understanding Concurrency With a Scraper
  • Containerizing and Testing a Python Backtesting System With Docker and GitHub Actions

Trending

  • When to Use AMQP, JMS, Kafka, or MQTT: Trade-Offs, Not a Winner
  • Exactly-Once Stream Processing With Apache Flink
  • Surviving One Million Metrics per Second: Architecture Decisions That Actually Matter
  • Designing a Data Pipeline for Multi-Location Marketing Attribution (Before You Actually Need One)

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

  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
·
Sep. 10, 14 · Interview
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
11.6K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in

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

  • Content Negotiation for AI Agents: Serving Markdown Beside Your HTML
  • Smarter GitHub Copilot Prompts for Java Microservices: From APIs to Production Tests
  • Python Asyncio: Understanding Concurrency With a Scraper
  • Containerizing and Testing a Python Backtesting System With Docker and GitHub Actions

Partner Resources

×

Comments

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • 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