JSFiddle Docs
  • JSFiddle Docs & Help
  • Getting started
  • Panels settings
  • Editor settings
  • Fiddle meta
  • External resources
  • Embedding fiddles
  • Async requests
  • Github Integration
    • Display fiddle from a Github repository
    • Display fiddle from Gist
    • Pass response directly from a Github repo
    • Pass response directly from Gist
  • API
    • Displaying user fiddles
    • Display a fiddle from POST
    • Get username
  • Use cases
    • Demos for products or libraries
    • Bug reporting (test-case) for Github Issues
    • Answers on Stack Overflow
    • Live code collaboration
    • Conducting live interviews for developer positions
    • Code snippets hosting
Powered by GitBook
On this page
  • Demo directory structure
  • Running demo in JSFiddle
  • Example
  1. Github Integration

Pass response directly from a Github repo

While the demo might use an Async requests, JSFiddle will read them and send using the right MIME type.

Demo directory structure

Demo Directory/
  demo.response.html
  demo.response.json
  demo.response.xml

Running demo in JSFiddle

https://jsfiddle.net/gh/get/response.{extension}/{github_tree}/

URL segments in examples:

  • extension – the file extension of the demo.response.{extension} in github demo repository.

  • github_tree – the path to the directory used to display it on github page (without http://github.com/).

There is no JSONP functionality provided. One may achieve it using raw GitHub URL.

Example

Content of:

http://github.com/zalun/jsFiddleGithubDdemo/raw/master/Demo/demo.response.html

will be returned with text/html MIME type if this URL will be loaded from:

https://jsfiddle.net/gh/get/response.html/zalun/jsFiddleGithubDemo/tree/master/Demo/

Example:

PreviousDisplay fiddle from GistNextPass response directly from Gist

Last updated 6 years ago

http://jsfiddle.net/gh/get/mootools/1.2/zalun/jsFiddleGithubDemo/tree/master/Demo/