Search code examples
javascripthtmlgithub-pages

How to use iframes in github


I ran into some problems with my iframes in github. I am making an incremental game which uses iframes to display different pages for each section of a bannner I have on top of the page. It works with textastic currently but not pages. The repository is here: https://github.com/VSquidDevV/IdleMiner

GitHub Page: http://vsquiddevv.github.io/IdleMiner/


Solution

  • .. you reference the iframe outside of the repo, so it goes to
    https://raw.githubusercontent.com/…/pages/mainGame.html
    instead of to a relative path pages/mainGame.html.

    Change it in index.html in your github repo as was said by @hopkins-matt.