forked from Polymer/old-docs-site
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Global toggle for disqus. Use identifier as title incase urls change …
…in the future
- Loading branch information
Showing
2 changed files
with
5 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,17 @@ | ||
{% if site.load_disqus %} | ||
<hr> | ||
|
||
<div id="disqus_thread"></div> | ||
<script> | ||
var disqus_shortname = 'polymer-project'; | ||
var disqus_url = location.protocol + '//' + location.host + '{{page.url}}'; | ||
{% if page.title %}var disqus_identifier = "{{page.title | downcase | replace:' ','-'}}";{% endif %} | ||
|
||
(function() { | ||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; | ||
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; | ||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); | ||
})(); | ||
</script> | ||
|
||
{% endif %} |