diff --git a/_config.yml b/_config.yml index eb0ac069..5c6d9733 100644 --- a/_config.yml +++ b/_config.yml @@ -18,6 +18,8 @@ baseurl: "" url: "https://zbabystack.netlify.com" repository: moxiegirl/docs.blockstack +staticman: + branch: "master" github_editme_path: moxiegirl/docs-new/blob/master # if you're using Github, provide the basepath to the branch you've created for reviews, following the sample here. if not, leave this value blank. @@ -62,8 +64,8 @@ footer: copyright: Blockstack # Disqus comments shortname, requires Disqus account https://disqus.com/ -disqus: - shortname: # 1234 +# disqus: +# shortname: # 1234 # Google analytics code, get your code here https://www.google.com/analytics/ google_analytics: @@ -110,6 +112,12 @@ exclude: sass: style: compressed +defaults: + - scope: + path: "" # an empty string here means all files in the project + values: + comments: true + collections: android: output: true diff --git a/_includes/comment-form.html b/_includes/comment-form.html new file mode 100644 index 00000000..8ed51181 --- /dev/null +++ b/_includes/comment-form.html @@ -0,0 +1,51 @@ +{% unless page.comments_locked == true %} + +
Comments are closed. If you have a question concerning the content of this page, please feel free to contact me.
+{% endunless %} diff --git a/_includes/comment.html b/_includes/comment.html index 06ae0599..1821c4ce 100644 --- a/_includes/comment.html +++ b/_includes/comment.html @@ -1,35 +1,36 @@
+
+
{% if include.date %}
{% if include.index %}{% endif %}
-
+
{% if include.index %}{% endif %}
{% endif %}
-
+
{{ include.message | markdownify }}
{% unless include.replying_to != 0 or page.comments_locked == true %}
-
- Reply to {{ include.name }}
+
+ Reply to {{ include.name }}
{% endunless %}
diff --git a/_includes/comment__form.html b/_includes/comment__form.html
index 3b39ef0d..45bc2abe 100644
--- a/_includes/comment__form.html
+++ b/_includes/comment__form.html
@@ -1,29 +1,56 @@
-
-
+{% if page.comments == true %}
+
+ {% if site.repository and site.staticman.branch %}
+ {% if site.data.comments[page.slug] %}
+
+
+
+
+ {% endif %}
+
+
+
+{% endif %}
diff --git a/_includes/comments.html b/_includes/comments.html
new file mode 100644
index 00000000..705c5dfd
--- /dev/null
+++ b/_includes/comments.html
@@ -0,0 +1,27 @@
+
+ {% if site.repository and site.staticman.branch %}
+ {% if site.data.comments[page.slug] %}
+
+
+
+
+ {% assign comments = site.data.comments[page.slug] | sort | where_exp: 'comment', 'comment[1].replying_to == blank' %}
+ {% for comment in comments %}
+ {% assign index = forloop.index %}
+ {% assign replying_to = comment[1].replying_to | to_integer %}
+ {% assign avatar = comment[1].avatar %}
+ {% assign email = comment[1].email %}
+ {% assign name = comment[1].name %}
+ {% assign url = comment[1].url %}
+ {% assign date = comment[1].date %}
+ {% assign message = comment[1].message %}
+ {% include comment.html index=index replying_to=replying_to avatar=avatar email=email name=name url=url date=date message=message %}
+ {% endfor %}
+
+
+ {% endif %}
+
+ {% include comment-form.html %}
+ {% endif %}
+
diff --git a/_includes/footer.html b/_includes/footer.html
index 86d5bae1..634327e4 100644
--- a/_includes/footer.html
+++ b/_includes/footer.html
@@ -1,7 +1,7 @@
{% unless include.url == blank %} - - {% if include.name == site.author.name %} {% endif %}{{ include.name }} - + {{ include.name | strip_html }} {% else %} - {% if include.name == site.author.name %} {% endif %}{{ include.name }} + {{ include.name | strip_html }} {% endunless %}
-Comments
+ {% assign comments = site.data.comments[page.slug] | sort %} + {% for comment in comments %} + {% assign avatar = comment[1].avatar %} + {% assign email = comment[1].email %} + {% assign name = comment[1].name %} + {% assign url = comment[1].url %} + {% assign date = comment[1].date %} + {% assign message = comment[1].message %} + {% include comment.html index=forloop.index avatar=avatar email=email name=name url=url date=date message=message %} + {% endfor %} +Leave a Comment
+Your email address will not be published. Required fields are marked *
+ + + {% endif %} +{% if site.data.comments[page.slug].size > 1 %}{{ site.data.comments[page.slug] | size | append: ' ' }}{% endif %}Comments
+