Skip to content

Commit

Permalink
Make GH branch name customizable
Browse files Browse the repository at this point in the history
  • Loading branch information
tomalec committed Jun 7, 2016
1 parent 0f059dc commit b41eb64
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion iron-component-page.html
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,15 @@ <h2><span>[[active]]</span> <span class="version" hidden$="[[!version]]">[[versi
observer: '_srcChanged',
},

/**
* The name of a brnach used to fetch source for gh-pages.
* If not specified `master` is used.
*/
branchName: {
type: String,
value: 'master'
},

/**
* The relative root for determining paths to demos and default source
* detection.
Expand Down Expand Up @@ -532,7 +541,7 @@ <h2><span>[[active]]</span> <span class="version" hidden$="[[!version]]">[[versi
// Rewrite gh-pages URLs to https://rawgit.com/
var match = srcUrl.match(/([^\/\.]+)\.github\.io\/([^\/]+)\/?([^\/]*)$/);
if (match) {
srcUrl = "https://cdn.rawgit.com/" + match[1] + "/" + match[2] + "/master/" + match[3];
srcUrl = "https://cdn.rawgit.com/" + match[1] + "/" + match[2] + "/" + this.branchName + "/" + match[3];
}

this._baseUrl = _baseUrl(srcUrl);
Expand Down

0 comments on commit b41eb64

Please sign in to comment.