Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dadb3f7

Browse files
vjeuxzpao
authored andcommitted
Facebook comments integration on Docs and Blog
1 parent dcd8539 commit dadb3f7

File tree

4 files changed

+18
-1
lines changed

4 files changed

+18
-1
lines changed

docs/_css/react.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,3 +678,7 @@ p code {
678678
padding-top: 0;
679679
}
680680
}
681+
682+
.post {
683+
margin-bottom: 30px;
684+
}

docs/_layouts/default.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
<div class="right">&copy; 2013 Facebook Inc.</div>
7373
</footer>
7474
</div>
75+
<div id="fb-root"></div>
7576
<script>
7677
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
7778
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -81,7 +82,14 @@
8182
ga('send', 'pageview');
8283

8384
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
85+
86+
(function(d, s, id) {
87+
var js, fjs = d.getElementsByTagName(s)[0];
88+
if (d.getElementById(id)) return;
89+
js = d.createElement(s); js.id = id;
90+
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=623268441017527";
91+
fjs.parentNode.insertBefore(js, fjs);
92+
}(document, 'script', 'facebook-jssdk'));
8493
</script>
8594
</body>
8695
</html>
87-

docs/_layouts/docs.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,7 @@ <h1>{{ page.title }}</h1>
1919
<a class="docs-next" href="/react/docs/{{ page.next }}">Next &rarr;</a>
2020
{% endif %}
2121
</div>
22+
23+
<div class="fb-comments" data-width="650" data-num-posts="10" data-href="/react{{ page.url }}"></div>
2224
</div>
2325
</section>

docs/_layouts/post.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,8 @@ <h1>{{ page.title }}</h1>
1414
<div class="post">
1515
{{ content }}
1616
</div>
17+
18+
<div class="fb-like" data-send="true" data-width="650" data-show-faces="false"></div>
19+
<div class="fb-comments" data-width="650" data-num-posts="10" data-href="/react{{ page.url }}"></div>
1720
</div>
1821
</section>

0 commit comments

Comments
 (0)