Permalink
Browse files

Don't include the peer5 script when the peer5 integration is disabled

  • Loading branch information...
1 parent 797a469 commit e0ac89d6785a70a8e166975008cf8aa50e4e60ca @xdarklight committed Oct 24, 2015
Showing with 10 additions and 2 deletions.
  1. +7 −1 config/default.js
  2. +3 −1 website/templates/layout.jade
View
@@ -113,7 +113,13 @@ module.exports = {
{ src: "/stats.html", text: "Download statistics" },
{ src: "http://google.com", text: "google", target: "_blank" },
{ src: "http://github.com", text: "github", target: "_blank" }
- ]
+ ],
+
+ /**
+ * The peer5 API key/ID. Setting this enables the peer5 CDN
+ * integration. See https://www.peer5.com/
+ */
+ peer5Key: null
},
/** @see @href https://github.com/jnordberg/wintersmith#options */
@@ -25,9 +25,11 @@ html(lang='en')
script(type='text/javascript', src='//code.jquery.com/jquery-#{jqueryVersion}.min.js')
script(type='text/javascript', src='//cdn.datatables.net/#{datatablesVersion}/js/jquery.dataTables.min.js')
script(type='text/javascript', src='//maxcdn.bootstrapcdn.com/bootstrap/#{bootstrapVersion}/js/bootstrap.min.js')
- script(type='text/javascript', src='//api.peer5.com/peer5.js?id=#{peer5Key}')
script(type='text/javascript', src='#{contents.assets["main.js"].url}')
+ if peer5Key
+ script(type='text/javascript', src='//api.peer5.com/peer5.js?id=#{peer5Key}')
+
body
div.container-fluid
if locals.topImageUrl

0 comments on commit e0ac89d

Please sign in to comment.