diff options
-rw-r--r-- | source/_includes/article.html | 4 | ||||
-rw-r--r-- | source/_layouts/post.html | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/source/_includes/article.html b/source/_includes/article.html index d9c5139..347a52d 100644 --- a/source/_includes/article.html +++ b/source/_includes/article.html @@ -8,7 +8,9 @@ <div class="meta"> <div class="date">{% include post/date.html %}{{ time }}</div> <div class="tags">{% include post/categories.html %}</div> + {% if site.disqus_short_name and post.comments == true %} <div class="comments"><a href="{% if index %}{{ root_url }}{{ post.url }}{% endif %}#disqus_thread">留言</a></div> + {% endif %} </div> {% else %} <h1 class="title">{% if site.titlecase %}{{ page.title | titlecase }}{% else %}{{ page.title }}{% endif %}</h1> @@ -16,6 +18,8 @@ <div class="meta"> <div class="date">{% include post/date.html %}{{ time }}</div> <div class="tags">{% include post/categories.html %}</div> + {% if site.disqus_short_name and page.comments == true %} <div class="comments"><a href="{% if index %}{{ root_url }}{{ post.url }}{% endif %}#disqus_thread">留言</a></div> + {% endif %} </div> {% endif %}
\ No newline at end of file diff --git a/source/_layouts/post.html b/source/_layouts/post.html index 096b74d..27f7125 100644 --- a/source/_layouts/post.html +++ b/source/_layouts/post.html @@ -5,7 +5,9 @@ single: true <article class="post">{% include article.html %}</article> {% include post/sharing.html %} +{% if site.disqus_short_name and page.comments == true %} <section id="comment"> <h1 class="title">留言</h1> <div id="disqus_thread" aria-live="polite">{% include post/disqus_thread.html %}</div> -</section>
\ No newline at end of file +</section> +{% endif %}
\ No newline at end of file |