New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disqus and sidebar links configuration #111

Open
wants to merge 6 commits into
base: master
from
Copy path View file
@@ -23,6 +23,11 @@ <h1 id="{{ article.slug }}">{{ article.title }}</h1>
when=article.locale_date,
category='<a href="%s/%s">%s</a>'|format(SITEURL, article.category.url, article.category)|safe) }}
{% if DISQUS_SITENAME and DISQUS_COMMENT_COUNT %}
&#8226; <a href="{{ SITEURL }}/{{ article.url }}#disqus_thread">{{ _('View Comments') }}</a>
{% endif %}
{% if 'post_stats' in PLUGINS %}
&#8226; {{ article.stats['read_mins'] }} min read
{% endif %}
Copy path View file
@@ -113,7 +113,11 @@ <h1><a href="{{ SITEURL }}">{{ SITETITLE }}</a></h1>
{% endfor %}
{% for name, link in LINKS %}
{% if DISABLE_PAGE_BLANK_TARGET %}
<li><a href="{{ link }}">{{ name }}</a></li>
{% else %}
<li><a href="{{ link }}" target="_blank">{{ name }}</a></li>
{% endif %}
{% endfor %}
</ul>
</nav>
@@ -197,5 +201,22 @@ <h1><a href="{{ SITEURL }}">{{ SITETITLE }}</a></h1>
{% if GITHUB_CORNER_URL %}
{% include 'partial/github.html' %}
{% endif %}
{% if DISQUS_SITENAME %}
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = '{{ DISQUS_SITENAME }}'; // required: replace example with your forum shortname
/* * * DON'T EDIT BELOW THIS LINE * * */
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>
{% endif %}
</body>
</html>
Copy path View file
@@ -21,6 +21,10 @@ <h2><a href="{{ SITEURL }}/{{ article.url }}{% if not DISABLE_URL_HASH %}#{{ art
when=article.locale_date,
category='<a href="%s/%s">%s</a>'|format(SITEURL, article.category.url, article.category)|safe) }}
{% if DISQUS_SITENAME and DISQUS_COMMENT_COUNT %}
&#8226; <a href="{{ SITEURL }}/{{ article.url }}#disqus_thread">{{ _('View Comments') }}</a>
{% endif %}
{% if article.tags and not HOME_HIDE_TAGS %}
&#8226; {{ _('Tagged with') }}
{% for tag in article.tags %}
Copy path View file
@@ -3,6 +3,9 @@
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_shortname = '{{ DISQUS_SITENAME }}';
{% if article.url %}
var disqus_url = '{{ SITEURL }}/{{ article.url }}';
{% endif %}
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
@@ -14,3 +17,4 @@
</noscript>
<!-- End Disqus -->
{% endif %}
ProTip! Use n and p to navigate between commits in a pull request.