diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6b638b9d..4d245cd9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,9 @@
+## [3.4.0](https://github.com/mmistakes/minimal-mistakes/releases/tag/3.4.0)
+
+### Enhancements
+
+- Support static-based commenting via [Staticman](https://staticman.net/) for sites hosted with GitHub Pages. [#424](https://github.com/mmistakes/minimal-mistakes/issues/424)
+
## [3.3.7](https://github.com/mmistakes/minimal-mistakes/releases/tag/3.3.7)
### Bug Fixes
@@ -18,19 +24,19 @@
### Bug Fixes
-- Fix blank `site.teaser` bug [#412](https://github.com/mmistakes/minimal-mistakes/issues/412)
+- Fix blank `site.teaser` bug. [#412](https://github.com/mmistakes/minimal-mistakes/issues/412)
## [3.3.5](https://github.com/mmistakes/minimal-mistakes/releases/tag/3.3.5)
### Enhancements
-- Add English default text `site.locale` strings [#407](https://github.com/mmistakes/minimal-mistakes/issues/407)
+- Add English default text `site.locale` strings. [#407](https://github.com/mmistakes/minimal-mistakes/issues/407)
- Add Portuguese localized UI text. [#411](https://github.com/mmistakes/minimal-mistakes/pull/411)
- Add Italian localized UI text. [#409](https://github.com/mmistakes/minimal-mistakes/pull/409)
### Maintenance
-- Remove unused Google AdSense variables in `_config.yml` [#404](https://github.com/mmistakes/minimal-mistakes/issues/404)
+- Remove unused Google AdSense variables in `_config.yml`. [#404](https://github.com/mmistakes/minimal-mistakes/issues/404)
- Update `Gemfile` instructions for using `github-pages` vs. native `jekyll` gems.
- Disable `gems:` in `_config.yml` and enable plugins with Bundler instead.
- Add `repository` to `_config.yml` to suppress GitHub Pages error `Liquid Exception: No repo name found.`
diff --git a/README.md b/README.md
index bb1f2ed7..ce16d646 100644
--- a/README.md
+++ b/README.md
@@ -24,7 +24,7 @@ The theme includes responsive layouts (`single`, `archive`, and `splash` pages)
- Several layout options (single, archive, splash pages)
- SEO optimized with support for [Twitter Cards](https://dev.twitter.com/cards/overview) and [Open Graph](http://ogp.me/) data
- Optional header images, sidebars, table of contents, galleries, related posts, breadcrumb links, and more.
-- Optional comments ([Disqus](https://disqus.com/), [Facebook](https://developers.facebook.com/docs/plugins/comments), Google+, [Discourse](https://www.discourse.org/), and custom).
+- Optional comments ([Disqus](https://disqus.com/), [Facebook](https://developers.facebook.com/docs/plugins/comments), Google+, [Discourse](https://www.discourse.org/), static-based via [Staticman](https://staticman.net/), and custom).
- Optional analytics ([Google Analytics](https://www.google.com/analytics/) and custom).
- UI localized text: English (default), Spanish, French, and Turkish.
diff --git a/_config.yml b/_config.yml
index 242574ae..7394db7b 100644
--- a/_config.yml
+++ b/_config.yml
@@ -18,7 +18,7 @@ teaser : # filename of teaser fallback teaser image placed in
# breadcrumbs : false # true, false (default)
words_per_minute : 200
comments:
- provider : # false (default), "disqus", "discourse", "facebook", "google-plus", custom"
+ provider : # false (default), "disqus", "discourse", "facebook", "google-plus", "staticman", "custom"
disqus:
shortname : # https://help.disqus.com/customer/portal/articles/466208-what-s-a-shortname-
discourse:
@@ -28,6 +28,21 @@ comments:
appid :
num_posts : # 5 (default)
colorscheme : # "light" (default), "dark"
+staticman:
+ allowedFields : ['name', 'email', 'url', 'message']
+ branch : # "master", "gh-pages"
+ commitMessage : "New comment."
+ format : "yml"
+ moderation : true
+ path : "_data/comments/{options.slug}"
+ requiredFields : ['name', 'email', 'message']
+ transforms:
+ email : "md5"
+ generatedFields:
+ date:
+ type : "date"
+ options:
+ format : "iso8601" # "iso8601" (default), "timestamp-seconds", "timestamp-milliseconds"
atom_feed:
path : # blank (default) uses feed.xml
diff --git a/_data/ui-text.yml b/_data/ui-text.yml
index 13addada..619b9f90 100644
--- a/_data/ui-text.yml
+++ b/_data/ui-text.yml
@@ -3,30 +3,45 @@
# English (default)
# -----------------
en: &DEFAULT_EN
- page : "Page"
- pagination_previous : "Previous"
- pagination_next : "Next"
- breadcrumb_home_label : "Home"
- breadcrumb_separator : "/"
- toc_label : "On This Page"
- ext_link_label : "Direct Link"
- less_than : "less than"
- minute_read : "minute read"
- share_on_label : "Share on"
- meta_label :
- tags_label : "Tags:"
- categories_label : "Categories:"
- date_label : "Updated:"
- comments_label : "Leave a Comment"
- more_label : "Learn More"
- related_label : "You May Also Enjoy"
- follow_label : "Follow:"
- feed_label : "Feed"
- powered_by : "Powered by"
- website_label : "Website"
- email_label : "Email"
- recent_posts : "Recent Posts"
- undefined_wpm : "Undefined parameter words_per_minute at _config.yml"
+ page : "Page"
+ pagination_previous : "Previous"
+ pagination_next : "Next"
+ breadcrumb_home_label : "Home"
+ breadcrumb_separator : "/"
+ toc_label : "On This Page"
+ ext_link_label : "Direct Link"
+ less_than : "less than"
+ minute_read : "minute read"
+ share_on_label : "Share on"
+ meta_label :
+ tags_label : "Tags:"
+ categories_label : "Categories:"
+ date_label : "Updated:"
+ comments_label : "Leave a Comment"
+ comments_title : "Comments"
+ more_label : "Learn More"
+ related_label : "You May Also Enjoy"
+ follow_label : "Follow:"
+ feed_label : "Feed"
+ powered_by : "Powered by"
+ website_label : "Website"
+ email_label : "Email"
+ recent_posts : "Recent Posts"
+ undefined_wpm : "Undefined parameter words_per_minute at _config.yml"
+ comment_form_info : "Your email address will not be published. Required fields are marked"
+ comment_form_comment_label : "Comment"
+ comment_form_md_info : "Markdown is supported."
+ comment_form_name_label : "Name"
+ comment_form_email_label : "Email address"
+ comment_form_website_label : "Website (optional)"
+ comment_btn_submit : "Submit Comment"
+ comment_btn_submitted : "Submitted"
+ comment_success_title : "Comment submitted"
+ comment_success_msg : "Thanks for your comment! It will show on the site once it has been approved."
+ comment_error_title : "Error"
+ comment_error_msg : "Sorry, there was an error with your submission. Please make sure all required fields have been completed and try again."
+ close_btn_label : "close"
+ loading_label : "Loading..."
en-US:
<<: *DEFAULT_EN
en-CA:
@@ -39,30 +54,45 @@ en-AU:
# Spanish
# --------------
es: &DEFAULT_ES
- page : "Página"
- pagination_previous : "Anterior"
- pagination_next : "Siguiente"
- breadcrumb_home_label : "Inicio"
- breadcrumb_separator : "/"
- toc_label : "Contenidos"
- ext_link_label : "Enlace"
- less_than : "menos de"
- minute_read : "minuto de lectura"
- share_on_label : "Compartir"
- meta_label :
- tags_label : "Etiquetas:"
- categories_label : "Categorías:"
- date_label : "Actualizado:"
- comments_label : "Comentar"
- more_label : "Ver más"
- related_label : "Podrías ver también"
- follow_label : "Seguir:"
- feed_label : "Feed"
- powered_by : "Powered by"
- website_label : "Sitio web"
- email_label : "Email"
- recent_posts : "Entradas recientes"
- undefined_wpm : "Parametro words_per_minute (Palabras por minuto) no definido en _config.yml"
+ page : "Página"
+ pagination_previous : "Anterior"
+ pagination_next : "Siguiente"
+ breadcrumb_home_label : "Inicio"
+ breadcrumb_separator : "/"
+ toc_label : "Contenidos"
+ ext_link_label : "Enlace"
+ less_than : "menos de"
+ minute_read : "minuto de lectura"
+ share_on_label : "Compartir"
+ meta_label :
+ tags_label : "Etiquetas:"
+ categories_label : "Categorías:"
+ date_label : "Actualizado:"
+ comments_label : "Comentar"
+ comments_title :
+ more_label : "Ver más"
+ related_label : "Podrías ver también"
+ follow_label : "Seguir:"
+ feed_label : "Feed"
+ powered_by : "Powered by"
+ website_label : "Sitio web"
+ email_label : "Email"
+ recent_posts : "Entradas recientes"
+ undefined_wpm : "Parametro words_per_minute (Palabras por minuto) no definido en _config.yml"
+ comment_form_info :
+ comment_form_comment_label :
+ comment_form_md_info :
+ comment_form_name_label :
+ comment_form_email_label :
+ comment_form_website_label :
+ comment_btn_submit :
+ comment_btn_submitted :
+ comment_success_title :
+ comment_success_msg :
+ comment_error_title :
+ comment_error_msg :
+ close_btn_label :
+ loading_label :
es-ES:
<<: *DEFAULT_ES
es-CO:
@@ -71,30 +101,45 @@ es-CO:
# French
# -----------------
fr: &DEFAULT_FR
- page : "Page"
- pagination_previous : "Précédent"
- pagination_next : "Suivant"
- breadcrumb_home_label : "Accueil"
- breadcrumb_separator : "/"
- toc_label : "Sur cette page"
- ext_link_label : "Lien direct"
- less_than : "plus petit que"
- minute_read : "minute de lecture"
- share_on_label : "Partager sur"
- meta_label :
- tags_label : "Tags :"
- categories_label : "Catégories :"
- date_label : "Mis à jour :"
- comments_label : "Laisser un commentaire"
- more_label : "Lire plus"
- related_label : "Vous pourriez aimer"
- follow_label : "Suivez moi"
- feed_label : "Flux"
- powered_by : "Propulsé par"
- website_label : "Site"
- email_label : "Email"
- recent_posts : "Posts récents"
- undefined_wpm : "Le paramètre words_per_minute n'est pas défini dans _config.yml"
+ page : "Page"
+ pagination_previous : "Précédent"
+ pagination_next : "Suivant"
+ breadcrumb_home_label : "Accueil"
+ breadcrumb_separator : "/"
+ toc_label : "Sur cette page"
+ ext_link_label : "Lien direct"
+ less_than : "plus petit que"
+ minute_read : "minute de lecture"
+ share_on_label : "Partager sur"
+ meta_label :
+ tags_label : "Tags :"
+ categories_label : "Catégories :"
+ date_label : "Mis à jour :"
+ comments_label : "Laisser un commentaire"
+ comments_title :
+ more_label : "Lire plus"
+ related_label : "Vous pourriez aimer"
+ follow_label : "Suivez moi"
+ feed_label : "Flux"
+ powered_by : "Propulsé par"
+ website_label : "Site"
+ email_label : "Email"
+ recent_posts : "Posts récents"
+ undefined_wpm : "Le paramètre words_per_minute n'est pas défini dans _config.yml"
+ comment_form_info :
+ comment_form_comment_label :
+ comment_form_md_info :
+ comment_form_name_label :
+ comment_form_email_label :
+ comment_form_website_label :
+ comment_btn_submit :
+ comment_btn_submitted :
+ comment_success_title :
+ comment_success_msg :
+ comment_error_title :
+ comment_error_msg :
+ close_btn_label :
+ loading_label :
fr-FR:
<<: *DEFAULT_FR
fr-BE:
@@ -105,60 +150,90 @@ fr-CH:
# Turkish
# -----------------
tr: &DEFAULT_TR
- page : "Sayfa"
- pagination_previous : "Önceki"
- pagination_next : "Sonraki"
- breadcrumb_home_label : "Ana Sayfa"
- breadcrumb_separator : "/"
- toc_label : "İçindekiler"
- ext_link_label : "Doğrudan Bağlantı"
- less_than : "Şu süreden az: "
- minute_read : "dakika tahmini okuma süresi"
- share_on_label : "Paylaş"
- meta_label :
- tags_label : "Etiketler:"
- categories_label : "Kategoriler:"
- date_label : "Güncelleme tarihi:"
- comments_label : "Yorum yapın"
- more_label : "Daha fazlasını öğrenin"
- related_label : "Bunlar ilginizi çekebilir:"
- follow_label : "Takip et:"
- feed_label : "RSS"
- powered_by : "Emeği geçenler: "
- website_label : "Web sayfası"
- email_label : "E-posta"
- recent_posts : "Son yazılar"
- undefined_wpm : "_config.yml dosyasında tanımlanmamış words_per_minute parametresi"
+ page : "Sayfa"
+ pagination_previous : "Önceki"
+ pagination_next : "Sonraki"
+ breadcrumb_home_label : "Ana Sayfa"
+ breadcrumb_separator : "/"
+ toc_label : "İçindekiler"
+ ext_link_label : "Doğrudan Bağlantı"
+ less_than : "Şu süreden az: "
+ minute_read : "dakika tahmini okuma süresi"
+ share_on_label : "Paylaş"
+ meta_label :
+ tags_label : "Etiketler:"
+ categories_label : "Kategoriler:"
+ date_label : "Güncelleme tarihi:"
+ comments_label : "Yorum yapın"
+ comments_title :
+ more_label : "Daha fazlasını öğrenin"
+ related_label : "Bunlar ilginizi çekebilir:"
+ follow_label : "Takip et:"
+ feed_label : "RSS"
+ powered_by : "Emeği geçenler: "
+ website_label : "Web sayfası"
+ email_label : "E-posta"
+ recent_posts : "Son yazılar"
+ undefined_wpm : "_config.yml dosyasında tanımlanmamış words_per_minute parametresi"
+ comment_form_info :
+ comment_form_comment_label :
+ comment_form_md_info :
+ comment_form_name_label :
+ comment_form_email_label :
+ comment_form_website_label :
+ comment_btn_submit :
+ comment_btn_submitted :
+ comment_success_title :
+ comment_success_msg :
+ comment_error_title :
+ comment_error_msg :
+ close_btn_label :
+ loading_label :
tr-TR:
<<: *DEFAULT_TR
# Brazilian Portguese
# -----------------
pt: &DEFAULT_PT
- page : "Página"
- pagination_previous : "Anterior"
- pagination_next : "Próxima"
- breadcrumb_home_label : "Home"
- breadcrumb_separator : "/"
- toc_label : "Nesta página"
- ext_link_label : "Link direto"
- less_than : "meno que"
- minute_read : "minutos de leitura"
- share_on_label : "Compartilhe em"
- meta_label :
- tags_label : "Tags:"
- categories_label : "Categorias:"
- date_label : "Atualizado em:"
- comments_label : "Deixe um comentário"
- more_label : "Aprenda Mais"
- related_label : "Você Talvez Goste Também"
- follow_label : "Acompanhe em"
- feed_label : "Feed"
- powered_by : "Feito com"
- website_label : "Site"
- email_label : "Email"
- recent_posts : "Postagens recentes"
- undefined_wpm : "Parâmetro indefinido em word_per_minute no _config.yml"
+ page : "Página"
+ pagination_previous : "Anterior"
+ pagination_next : "Próxima"
+ breadcrumb_home_label : "Home"
+ breadcrumb_separator : "/"
+ toc_label : "Nesta página"
+ ext_link_label : "Link direto"
+ less_than : "meno que"
+ minute_read : "minutos de leitura"
+ share_on_label : "Compartilhe em"
+ meta_label :
+ tags_label : "Tags:"
+ categories_label : "Categorias:"
+ date_label : "Atualizado em:"
+ comments_label : "Deixe um comentário"
+ comments_title :
+ more_label : "Aprenda Mais"
+ related_label : "Você Talvez Goste Também"
+ follow_label : "Acompanhe em"
+ feed_label : "Feed"
+ powered_by : "Feito com"
+ website_label : "Site"
+ email_label : "Email"
+ recent_posts : "Postagens recentes"
+ undefined_wpm : "Parâmetro indefinido em word_per_minute no _config.yml"
+ comment_form_info :
+ comment_form_comment_label :
+ comment_form_md_info :
+ comment_form_name_label :
+ comment_form_email_label :
+ comment_form_website_label :
+ comment_btn_submit :
+ comment_btn_submitted :
+ comment_success_title :
+ comment_success_msg :
+ comment_error_title :
+ comment_error_msg :
+ close_btn_label :
+ loading_label :
pt-BR:
<<: *DEFAULT_PT
pt-PT:
@@ -167,30 +242,45 @@ pt-PT:
# Italian
# -----------------
it: &DEFAULT_IT
- page : "Pagina"
- pagination_previous : "Precedente"
- pagination_next : "Prossima"
- breadcrumb_home_label : "Home"
- breadcrumb_separator : "/"
- toc_label : "Indice della pagina"
- ext_link_label : "Link"
- less_than : "meno di"
- minute_read : "minuto/i di lettura"
- share_on_label : "Condividi"
- meta_label :
- tags_label : "Tags:"
- categories_label : "Categorie:"
- date_label : "Aggiornato:"
- comments_label : "Scrivi un commento"
- more_label : "Scopri di più"
- related_label : "Potrebbe Piacerti Anche"
- follow_label : "Segui:"
- feed_label : "Feed"
- powered_by : "Powered by"
- website_label : "Website"
- email_label : "Email"
- recent_posts : "Articoli Recenti"
- undefined_wpm : "Parametro words_per_minute non definito in _config.yml"
+ page : "Pagina"
+ pagination_previous : "Precedente"
+ pagination_next : "Prossima"
+ breadcrumb_home_label : "Home"
+ breadcrumb_separator : "/"
+ toc_label : "Indice della pagina"
+ ext_link_label : "Link"
+ less_than : "meno di"
+ minute_read : "minuto/i di lettura"
+ share_on_label : "Condividi"
+ meta_label :
+ tags_label : "Tags:"
+ categories_label : "Categorie:"
+ date_label : "Aggiornato:"
+ comments_label : "Scrivi un commento"
+ comments_title :
+ more_label : "Scopri di più"
+ related_label : "Potrebbe Piacerti Anche"
+ follow_label : "Segui:"
+ feed_label : "Feed"
+ powered_by : "Powered by"
+ website_label : "Website"
+ email_label : "Email"
+ recent_posts : "Articoli Recenti"
+ undefined_wpm : "Parametro words_per_minute non definito in _config.yml"
+ comment_form_info :
+ comment_form_comment_label :
+ comment_form_md_info :
+ comment_form_name_label :
+ comment_form_email_label :
+ comment_form_website_label :
+ comment_btn_submit :
+ comment_btn_submitted :
+ comment_success_title :
+ comment_success_msg :
+ comment_error_title :
+ comment_error_msg :
+ close_btn_label :
+ loading_label :
it-IT:
<<: *DEFAULT_IT
diff --git a/_includes/comment.html b/_includes/comment.html
new file mode 100644
index 00000000..17e874a6
--- /dev/null
+++ b/_includes/comment.html
@@ -0,0 +1,22 @@
+
\ No newline at end of file
diff --git a/_includes/comments-providers/scripts.html b/_includes/comments-providers/scripts.html
index 0da90c5d..ed192f7e 100644
--- a/_includes/comments-providers/scripts.html
+++ b/_includes/comments-providers/scripts.html
@@ -9,6 +9,8 @@
{% include /comments-providers/facebook.html %}
{% when "google-plus" %}
{% include /comments-providers/google-plus.html %}
+{% when "staticman" %}
+ {% include /comments-providers/staticman.html %}
{% when "custom" %}
{% include /comments-providers/custom.html %}
{% endcase %}
diff --git a/_includes/comments-providers/staticman.html b/_includes/comments-providers/staticman.html
new file mode 100644
index 00000000..30a65ec8
--- /dev/null
+++ b/_includes/comments-providers/staticman.html
@@ -0,0 +1,53 @@
+{% if site.repository and site.staticman.branch %}
+
+
+
+
+
+
+
+
+
+
+
+{% endif %}
\ No newline at end of file
diff --git a/_includes/comments.html b/_includes/comments.html
index a01af60f..84355901 100644
--- a/_includes/comments.html
+++ b/_includes/comments.html
@@ -1,14 +1,75 @@
{% include base_path %}
{{ site.data.ui-text[site.locale].comments_title | default: "Comments" }}
+ {% assign comments = site.data.comments[page.slug] | sort %} + + {% for comment in comments %} + {% 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 email=email name=name url=url date=date message=message %} + {% endfor %} + {% endif %} +{{ site.data.ui-text[site.locale].comments_label | default: "Leave a Comment" }}
+{{ site.data.ui-text[site.locale].comment_form_info | default: "Your email address will not be published. Required fields are marked" }} *
+ + + {% endif %} +