diff --git a/CHANGELOG.md b/CHANGELOG.md index fff28c5..33fb2b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,11 @@ - # CHANGELOG +# CHANGELOG This file lists all non-trivial changes to Beautiful Jekyll. I often make small changes to documentation, to the demo site, or to the general look-and-feel. These changes will not be listed here. Any other minor changes will also not be listed here. +**2018-12-24** Add support for Staticman comments (#440) (thanks @VincentTam) + **2018-10-19** Move Google Analytics to the head (#419) (thanks @jpvicari) **2018-06-08** Add support for Facebook comments (#350) (thanks @npes87184) diff --git a/LICENSE b/LICENSE index 72fab4a..1258343 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2016 Dean Attali +Copyright (c) 2015-2018 Dean Attali Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -19,3 +19,12 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + +staticman integration +================================================================================= + +The MIT License (MIT) + +Copyright (c) 2013-2018 Michael Rose diff --git a/README.md b/README.md index 3ffc4dc..24db2e1 100644 --- a/README.md +++ b/README.md @@ -104,13 +104,21 @@ Many personalization settings in `_config.yml`, such as setting your name and si ### Allowing users to leave comments -If you want to enable comments on your site, Beautiful Jekyll supports either the [Disqus](https://disqus.com/) comments plugin or [Facebook](https://developers.facebook.com/docs/plugins/comments) comments. +If you want to enable comments on your site, Beautiful Jekyll supports either the [Disqus](https://disqus.com/) comments plugin, [Facebook](https://developers.facebook.com/docs/plugins/comments) comments or [Staticman](https://staticman.net). If any of these are set in the configuration file, then all blog posts will have comments turned on by default. To turn off comments on a particular blog post, add `comments: false` to the YAML front matter. If you want to add comments on the bottom of a non-blog page, add `comments: true` to the YAML front matter. + +#### Disqus comments To use Disqus, simply sign up to [Disqus](https://disqus.com/) and add your Disqus shortname to the `disqus` parameter in the `_config.yml` file. +#### Facebook comments + To use Facebook comments, create a Facebook app using [Facebook developers](https://developers.facebook.com/docs/apps/register), and add the Facebook App ID to the `fb_comment_id` parameter in `_config.yml`. -If either `disqus` or `fb_comment_id` parameters are set in the configuration file, then all blog posts will have comments turned on by default. To turn off comments on a particular blog post, add `comments: false` to the YAML front matter. If you want to add comments on the bottom of a non-blog page, add `comments: true` to the YAML front matter. +#### Staticman comments + +To use Staticman, you first need to invite `staticmanlab` as a collaborator to your repository (by going to your repository **Settings** page, navigate to the **Collaborators** tab, and add the username `staticmanlab`), and then accept the invitation by going to `https://staticman3.herokuapp.com/v3/connect/github//`. Lastly, fill in your `repository` and `branch` in `_config.yml`. If you're not using `master` branch, then you also need to update the `branch` parameter in `staticman.yml`. + +![Staicman invitation screenshot](https://user-images.githubusercontent.com/5748535/50357920-e8f25500-0557-11e9-9cb6-73f8b575c4f0.png) ### Adding Google Analytics to track page views diff --git a/_config.yml b/_config.yml index a300d0d..8acfb65 100644 --- a/_config.yml +++ b/_config.yml @@ -129,6 +129,17 @@ url-pretty: "MyWebsite.com" # eg. "deanattali.com/beautiful-jekyll" # To use Facebook Comments, fill in a Facebook App ID # fb_comment_id: "" +# Staticman support +staticman: + repository : # GitHub username/repo-name e.g. "daattali/beautiful-jekyll" + branch : # "master" + endpoint : # URL of your own deployment with trailing slash, will fallback to the public GitLab instance + # reCaptcha for Staticman (OPTIONAL) + # If you use recaptcha, you must also set these parameters in staticman.yml + reCaptcha: + siteKey : # Use your OWN site key. You may apply to Google for one. + secret : # (!) ENCRYPT your password by opening https://staticman3.herokuapp.com/v3/encrypt/{your-site-secret} + # --- Misc --- # # Facebook App ID diff --git a/_data/ui-text.yml b/_data/ui-text.yml new file mode 100644 index 0000000..bb67a15 --- /dev/null +++ b/_data/ui-text.yml @@ -0,0 +1,494 @@ +# User interface text and labels + +# English (default) +# ----------------- +en: &DEFAULT_EN + comments_label : "Leave a comment" + comments_title : "Comments" + 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_msg : "Thanks for your comment! It will show on the site once it has been approved." + comment_error_msg : "Sorry, there was an error with your submission. Please make sure all required fields have been completed and try again." +en-US: + <<: *DEFAULT_EN +en-CA: + <<: *DEFAULT_EN +en-GB: + <<: *DEFAULT_EN +en-AU: + <<: *DEFAULT_EN + +# Spanish +# ------- +es: &DEFAULT_ES + comments_label : "Dejar un commentario" + comments_title : "Comentar" + comment_form_info : "Su dirección de correo no será publicada. Se han resaltado los campos requeridos" + comment_form_comment_label : "Comentario" + comment_form_md_info : "Markdown está soportado." + comment_form_name_label : "Nombre" + comment_form_email_label : "Dirección de E-mail" + comment_form_website_label : "Sitio web (opcional)" + comment_btn_submit : "Enviar Commentario" + comment_btn_submitted : "Enviado" + comment_success_msg : "Gracias por su comentario!, Este se visualizará en el sitio una vez haya sido aprobado" + comment_error_msg : "Lo sentimos, ha ocurrido un error al enviar su comentario. Por favor asegurese que todos los campos han sido diligenciados e intente de nuevo" +es-ES: + <<: *DEFAULT_ES +es-CO: + <<: *DEFAULT_ES + +# French +# ------ +fr: &DEFAULT_FR + comments_label : "Laisser un commentaire" + comments_title : "Commentaires" + comment_form_info : "Votre adresse email ne sera pas visible. Les champs obligatoires sont marqués" + comment_form_comment_label : "Commentaire" + comment_form_md_info : "Markdown est supporté." + comment_form_name_label : "Nom" + comment_form_email_label : "Adresse mail" + comment_form_website_label : "Site web (optionnel)" + comment_btn_submit : "Envoyer" + comment_btn_submitted : "Envoyé" + comment_success_msg : "Merci pour votre commentaire, il sera visible sur le site une fois approuvé." + comment_error_msg : "Désolé, une erreur est survenue lors de la soumission. Vérifiez que les champs obligatoires ont été remplis et réessayez." +fr-FR: + <<: *DEFAULT_FR +fr-BE: + <<: *DEFAULT_FR +fr-CH: + <<: *DEFAULT_FR + +# Turkish +# ------- +tr: &DEFAULT_TR + comments_label : "Yorum yapın" + comments_title : "Yorumlar" + comment_form_info : "Email adresiniz gösterilmeyecektir. Zorunlu alanlar işaretlenmiştir" + comment_form_comment_label : "Yorumunuz" + comment_form_md_info : "Markdown desteklenmektedir." + comment_form_name_label : "Adınız" + comment_form_email_label : "Email adresiniz" + comment_form_website_label : "Websiteniz (opsiyonel)" + comment_btn_submit : "Yorum Yap" + comment_btn_submitted : "Gönderildi" + comment_success_msg : "Yorumunuz için teşekkürler! Yorumunuz onaylandıktan sonra sitede gösterilecektir." + comment_error_msg : "Maalesef bir hata oluştu. Lütfen zorunlu olan tüm alanları doldurduğunuzdan emin olun ve sonrasında tekrar deneyin." +tr-TR: + <<: *DEFAULT_TR + +# Portuguese +# ---------- +pt: &DEFAULT_PT + comments_label : "Deixe um Comentário" + comments_title : "Comentários" + comment_form_info : "O seu endereço email não será publicado. Os campos obrigatórios estão assinalados" + comment_form_comment_label : "Comentário" + comment_form_md_info : "Markdown é suportado." + comment_form_name_label : "Nome" + comment_form_email_label : "Endereço Email" + comment_form_website_label : "Site (opcional)" + comment_btn_submit : "Sumbeter Comentário" + comment_btn_submitted : "Submetido" + comment_success_msg : "Obrigado pelo seu comentário! Será visível no site logo que aprovado." + comment_error_msg : "Lamento, ocorreu um erro na sua submissão. Por favor verifique se todos os campos obrigatórios estão corretamente preenchidos e tente novamente." +pt-PT: + <<: *DEFAULT_PT +# Brazilian Portuguese +pt-BR: + comments_label : "Deixe um comentário" + comments_title : + comment_form_info : "Seu email não será publicado. Os campos obrigatórios estão marcados" + comment_form_comment_label : "Comentário" + comment_form_md_info : "Markdown é suportado." + comment_form_name_label : "Nome" + comment_form_email_label : "Email" + comment_form_website_label : "Site (opcional)" + comment_btn_submit : "Enviar Comentário" + comment_btn_submitted : "Enviado" + comment_success_msg : "Obrigado pelo seu comentário! Ele aparecerá no site assim que for aprovado." + comment_error_msg : "Desculpe, ocorreu um erro no envio. Por favor verifique se todos os campos obrigatórios foram preenchidos e tente novamente." + +# Italian +# ------- +it: &DEFAULT_IT + comments_label : "Scrivi un commento" + comments_title : + comment_form_info : "Il tuo indirizzo email non sarà pubblicato. Sono segnati i campi obbligatori" + comment_form_comment_label : "Commenta" + comment_form_md_info : "Il linguaggio Markdown è supportato" + comment_form_name_label : "Nome" + comment_form_email_label : "Indirizzo email" + comment_form_website_label : "Sito Web (opzionale)" + comment_btn_submit : "Invia commento" + comment_btn_submitted : "Inviato" + comment_success_msg : "Grazie per il tuo commento! Verrà visualizzato nel sito una volta che sarà approvato." + comment_error_msg : "C'è stato un errore con il tuo invio. Assicurati che tutti i campi richiesti siano stati completati e riprova." +it-IT: + <<: *DEFAULT_IT + +# Chinese (zh-CN Chinese - China) +# -------------------------------- +zh: &DEFAULT_ZH_HANS + comments_label : "留下评论" + comments_title : "评论" + comment_form_info : "您的电子邮箱地址并不会被展示。请填写标记为必须的字段。" + comment_form_comment_label : "评论" + comment_form_md_info : "Markdown语法已支持。" + comment_form_name_label : "姓名" + comment_form_email_label : "电子邮箱" + comment_form_website_label : "网站(可选)" + comment_btn_submit : "提交评论" + comment_btn_submitted : "已提交" + comment_success_msg : "感谢您的评论!被批准后它会立即在此站点展示。" + comment_error_msg : "很抱歉,您的提交存在错误。请确保所有必填字段都已填写正确,然后再试一次。" +zh-CN: + <<: *DEFAULT_ZH_HANS +zh-SG: + <<: *DEFAULT_ZH_HANS +# Taiwan (Traditional Chinese) +zh-TW: &DEFAULT_ZH_HANT + comments_label : "留言" + comments_title : "留言內容" + comment_form_comment_label : "留言內容" + comment_form_md_info : "支援Markdown語法。" + comment_form_name_label : "名字" + comment_form_email_label : "電子信箱帳號" + comment_form_website_label : "網頁 (可選填)" + comment_btn_submit : "送出留言" + comment_btn_submitted : "已送出" + comment_success_msg : "感謝您的留言! 審核後將會顯示在站上。" + comment_error_msg : "抱歉,部份資料輸入有問題。請確認資料填寫正確後再試一次。" +zh-HK: + <<: *DEFAULT_ZH_HANT + +# German / Deutsch +# ---------------- +de: &DEFAULT_DE + comments_label : "Hinterlassen Sie einen Kommentar" + comments_title : "Kommentare" + comment_form_info : "Ihre E-Mail Adresse wird nicht veröffentlicht. Benötigte Felder sind markiert" + comment_form_comment_label : "Kommentar" + comment_form_md_info : "Markdown wird unterstützt." + comment_form_name_label : "Name" + comment_form_email_label : "E-Mail-Addresse" + comment_form_website_label : "Webseite (optional)" + comment_btn_submit : "Kommentar absenden" + comment_btn_submitted : "Versendet" + comment_success_msg : "Danke für Ihren Kommentar! Er wird auf der Seite angezeigt, nachdem er geprüft wurde." + comment_error_msg : "Entschuldigung, es gab einen Fehler. Bitte füllen Sie alle benötigten Felder aus und versuchen Sie es erneut." +de-DE: + <<: *DEFAULT_DE +de-AT: + <<: *DEFAULT_DE +de-CH: + <<: *DEFAULT_DE +de-BE: + <<: *DEFAULT_DE +de-LI: + <<: *DEFAULT_DE +de-LU: + <<: *DEFAULT_DE + +# Nepali (Nepal) +# -------------- +ne: &DEFAULT_NE + comments_label : "टिप्पणी दिनुहोस्" + comments_title : "टिप्पणीहरू" + 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_msg : "तपाईंको टिप्पणीको लागि धन्यवाद! एक पटक यो अनुमोदन गरेपछी यो साइटमा देखाउनेछ।" + comment_error_msg : "माफ गर्नुहोस्, तपाईंको टिप्पणी त्रुटि थियो।सबै आवश्यक जानकारीहरु पूरा गरिएको छ भने निश्चित गर्नुहोस् र फेरि प्रयास गर्नुहोस्।" +ne-NP: + <<: *DEFAULT_NE + +# Korean +# ------ +ko: &DEFAULT_KO + comments_label : "댓글남기기" + comments_title : "댓글" + 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_msg : "감사합니다! 댓글이 머지된 후 확인하실 수 있습니다." + comment_error_msg : "댓글 등록에 문제가 있습니다. 필요 필드를 작성했는지 확인하고 다시 시도하세요." +ko-KR: + <<: *DEFAULT_KO + +# Russian / Русский +# ----------------- +ru: &DEFAULT_RU + comments_label : "Оставить комментарий" + comments_title : "Комментарии" + comment_form_info : "Ваш адрес электронной почты не будет опубликован. Обязательные поля помечены" + comment_form_comment_label : "Комментарий" + comment_form_md_info : "Поддерживается синтаксис Markdown." + comment_form_name_label : "Имя" + comment_form_email_label : "Электронная почта" + comment_form_website_label : "Ссылка на сайт (необязательно)" + comment_btn_submit : "Оставить комментарий" + comment_btn_submitted : "Отправлено" + comment_success_msg : "Спасибо за Ваш комментарий! Он будет опубликован на сайте после проверки." + comment_error_msg : "К сожалению, произошла ошибка с отправкой комментария. Пожалуйста, убедитесь, что все обязательные поля заполнены и попытайтесь снова." +ru-RU: + <<: *DEFAULT_RU + +# Lithuanian / Lietuviškai +# ------------------------ +lt: &DEFAULT_LT + comments_label : "Palikti komentarą" + comments_title : "Komentaras" + comment_form_info : "El. pašto adresas nebus viešinamas. Būtini laukai pažymėti." + comment_form_comment_label : "Komentaras" + comment_form_md_info : "Markdown palaikomas." + comment_form_name_label : "Vardas" + comment_form_email_label : "El. paštas" + comment_form_website_label : "Tinklapis (nebūtina)" + comment_btn_submit : "Komentuoti" + comment_btn_submitted : "Įrašytas" + comment_success_msg : "Ačiū už komentarą! Jis bus parodytas kai bus patvirtintas." + comment_error_msg : "Atleiskite, įvyko netikėta klaida įrašant komentarą. Pasitikrinkite ar užpildėte visus būtinus laukus ir pamėginkite dar kartą." +lt-LT: + <<: *DEFAULT_LT + +# Greek +# ----- +gr: &DEFAULT_GR + comments_label : "Αφήστε ένα σχόλιο" + comments_title : "Σχόλια" + comment_form_info : "Η διεύθυνση email σας δεν θα δημοσιευθεί. Τα απαιτούμενα πεδία εμφανίζονται με αστερίσκο" + comment_form_comment_label : "Σχόλιο" + comment_form_md_info : "Το πεδίο υποστηρίζει Markdown." + comment_form_name_label : "Όνομα" + comment_form_email_label : "Διεύθυνση email" + comment_form_website_label : "Ιστοσελίδα (προαιρετικό)" + comment_btn_submit : "Υπόβαλε ένα σχόλιο" + comment_btn_submitted : "Έχει υποβληθεί" + comment_success_msg : "Ευχαριστούμε για το σχόλιό σας! Θα εμφανιστεί στην ιστοσελίδα αφού εγκριθεί." + comment_error_msg : "Λυπούμαστε, παρουσιάστηκε σφάλμα με την υποβολή σας. Παρακαλούμε βεβαιωθείτε ότι έχετε όλα τα απαιτούμενα πεδία συμπληρωμένα και δοκιμάστε ξανά." +gr-GR: + <<: *DEFAULT_GR + +# Swedish +# ------- +sv: &DEFAULT_SV + comments_label : "Lämna en kommentar" + comments_title : "Kommentarer" + comment_form_info : "Din e-post adress kommer inte att publiceras. Obligatoriska fält är markerade." + comment_form_comment_label : "Kommentar" + comment_form_md_info : "Använd Markdown för text-formateringen." + comment_form_name_label : "Namn" + comment_form_email_label : "E-post adress" + comment_form_website_label : "Webdsida (valfritt)" + comment_btn_submit : "Skicka en kommentar" + comment_btn_submitted : "Kommentaren har tagits emot" + comment_success_msg : "Tack för din kommentar! Den kommer att visas på sidan så fort den har godkännts." + comment_error_msg : "Tyvärr det har blivit något fel i en av fälten, se till att du fyller i alla rutor och försök igen." +sv-SE: + <<: *DEFAULT_SV +sv-FI: + <<: *DEFAULT_SV + +# Dutch +# ----- +nl: &DEFAULT_NL + comments_label : "Laat een reactie achter" + comments_title : "Commentaren" + comment_form_info : "Uw e-mailadres wordt niet gepubliceerd. Verplichte velden zijn gemarkeerd" + comment_form_comment_label : "Commentaar" + comment_form_md_info : "Markdown wordt ondersteund." + comment_form_name_label : "Naam" + comment_form_email_label : "E-mailadres" + comment_form_website_label : "Website (optioneel)" + comment_btn_submit : "Commentaar toevoegen" + comment_btn_submitted : "Toegevoegd" + comment_success_msg : "Bedankt voor uw reactie! Het zal op de site worden weergegeven zodra het is goedgekeurd." + comment_error_msg : "Sorry, er is een fout opgetreden bij uw inzending. Zorg ervoor dat alle vereiste velden zijn voltooid en probeer het opnieuw." +nl-BE: + <<: *DEFAULT_NL +nl-NL: + <<: *DEFAULT_NL + +# Indonesian +# ---------- +id: &DEFAULT_ID + comments_label : "Tinggalkan komentar" + comments_title : "Komentar" + comment_form_info : "Email Anda tidak akan dipublish. Kolom yang diperlukan ditandai" + comment_form_comment_label : "Komentar" + comment_form_md_info : "Markdown disupport." + comment_form_name_label : "Nama" + comment_form_email_label : "Alamat email" + comment_form_website_label : "Website (opsional)" + comment_btn_submit : "Submit Komentar" + comment_btn_submitted : "Telah disubmit" + comment_success_msg : "Terimakasih atas komentar Anda! Komentar ini akan tampil setelah disetujui." + comment_error_msg : "Maaf, ada kesalahan pada submisi Anda. Pastikan seluruh kolom sudah dilengkapi dan coba kembali." +id-ID: + <<: *DEFAULT_ID + +# Vietnamese +# ---------- +vi: &DEFAULT_VI + comments_label : "Để lại bình luận" + comments_title : "Bình luận" + comment_form_info : "Email của bạn sẽ được giữ bí mật. Các phần bắt buộc được đánh dấu." + comment_form_comment_label : "Bình luận" + comment_form_md_info : "Hỗ trợ Markdown." + comment_form_name_label : "Tên" + comment_form_email_label : "Địa chỉ email" + comment_form_website_label : "Website (không bắt buộc)" + comment_btn_submit : "Gửi bình luận" + comment_btn_submitted : "Đã được gửi" + comment_success_msg : "Cảm ơn bạn đã bình luận! Bình luận sẽ xuất hiện sau khi được duyệt." + comment_error_msg : "Rất tiếc, có lỗi trong việc gửi bình luận. Hãy đảm bảo toàn bộ các phần bắt buộc đã được điền đầy đủ và thử lại." +vi-VN: + <<: *DEFAULT_VI + +# Danish +# ------ +da: &DEFAULT_DA + comments_label : "Skriv en kommentar" + comments_title : "Kommentarer" + comment_form_info : "Din e-mail bliver ikke offentliggjort. Obligatoriske felter er markeret" + comment_form_comment_label : "Kommentar" + comment_form_md_info : "Markdown er understøttet." + comment_form_name_label : "Navn" + comment_form_email_label : "E-mail" + comment_form_website_label : "Website (frivillig)" + comment_btn_submit : "Send kommentar" + comment_btn_submitted : "Sendt" + comment_success_msg : "Tak for din kommentar! Den bliver vist på siden, så snart den er godkendt." + comment_error_msg : "Desværre skete der en fejl. Prøv igen, mens du sørger for at alle obligatoriske felter er udfyldt." +da-DK: + <<: *DEFAULT_DA + +# Polish +# ------ +pl: &DEFAULT_PL + comments_label : "Zostaw komentarz" + comments_title : "Komentarze" + comment_form_info : "Twój adres email nie będzie udostępiony. Wymagane pola są oznaczone." + comment_form_comment_label : "Skomentuj" + comment_form_md_info : "Markdown jest wspierany" + comment_form_name_label : "Imię" + comment_form_email_label : "Adres email" + comment_form_website_label : "Strona www (opcjonalna)" + comment_btn_submit : "Skomentuj" + comment_btn_submitted : "Komentarz dodany" + comment_success_msg : "Dziękuję za Twój komentarz! Zostanie dodany po akceptacji." + comment_error_msg : "Niestety wystąpił błąd. Proszę upewnij się, że wszystkie wymagane pola zostały wypełnione i spróbuj ponownie." +pl-PL: + <<: *DEFAULT_PL + +# Japanese +# -------- +ja: &DEFAULT_JA + comments_label : "コメントする" + comments_title : "コメント" + comment_form_info : "メールアドレスが公開されることはありません。次の印のある項目は必ず入力してください:" + comment_form_comment_label : "コメント" + comment_form_md_info : "Markdown を使用できます" + comment_form_name_label : "名前" + comment_form_email_label : "メールアドレス" + comment_form_website_label : "URL (任意)" + comment_btn_submit : "コメントを送信する" + comment_btn_submitted : "送信しました" + comment_success_msg : "コメントありがとうございます! コメントは承認されるとページに表示されます。" + comment_error_msg : "送信エラーです。必須項目がすべて入力されていることを確認して再送信してください。" +ja-JP: + <<: *DEFAULT_JA + +# Slovak +# ----------------- +sk: &DEFAULT_SK + comments_label : "Zanechaj odkaz" + comments_title : "Komentáre" + comment_form_info : "Tvoja emailová adresa nebude publikovaná. Požadované polia sú označené" + comment_form_comment_label : "Komentár" + comment_form_md_info : "Markdown je podporovaný." + comment_form_name_label : "Meno" + comment_form_email_label : "Emailová adresa" + comment_form_website_label : "Webstránka (voliteľné)" + comment_btn_submit : "Vlož komentár" + comment_btn_submitted : "Vložený" + comment_success_msg : "Ďakujem za tvoj komentár! Po schválení bude zobrazený na stránke." + comment_error_msg : "Prepáč, pri ukladaní nastala chyba. Ubezpeč sa prosím, že si vyplnil všetky požadované polia a skús znova." +sk-SK: + <<: *DEFAULT_SK + +# Hungarian +# ----------------- +hu: &DEFAULT_HU + comments_label : "Szólj hozzá!" + comments_title : "Hozzászólások" + comment_form_info : "Az e-mail címed nem lesz publikus. A csillagozott mezők kitöltése kötelező." + comment_form_comment_label : "Hozzászólás" + comment_form_md_info : "Támogatott formázási mód: Markdown" + comment_form_name_label : "Név" + comment_form_email_label : "Email cím" + comment_form_website_label : "Honlap (nem kötelező):" + comment_btn_submit : "Hozzászólás elküldése" + comment_btn_submitted : "Hozzászólás elküldve" + comment_success_msg : "Köszönjük a Hozzászólást! A Hozzászólások csak előzetes moderáció után lesznek publikusak." + comment_error_msg : "Hoppá, hiba történt a beküldés közben. Kérlek ellenőrizd hogy minden kötelező mező ki van-e töltve." +hu-HU: + <<: *DEFAULT_HU + +# Romanian +# ----------------- +ro: &DEFAULT_RO + comments_label : "Lasă un comentariu" + comments_title : "Comentarii" + comment_form_info : "Adresa ta de email nu va fi făcută publică. Câmpurile marcate sunt obligatorii" + comment_form_comment_label : "Comentariu" + comment_form_md_info : "Markdown este suportat." + comment_form_name_label : "Nume" + comment_form_email_label : "Adresă de email" + comment_form_website_label : "Site (opțional)" + comment_btn_submit : "Trimite comentariul" + comment_btn_submitted : "Trimis" + comment_success_msg : "Mulțumesc pentru comentariu! Va apărea pe site în momentul în care va fi aprobat." + comment_error_msg : "Scuze, este o problemă cu comentariul tău. Asigură-te că toate câmpurile obligatorii au fost completate și încearcă din nou." +ro-RO: + <<: *DEFAULT_RO + +# Punjabi +# ----------------- +pa: &DEFAULT_PA + comments_label : "ਇੱਕ ਟਿੱਪਣੀ ਛੱਡੋ" + comments_title : "ਟਿੱਪਣੀਆਂ" + 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_msg : "ਤੁਹਾਡੀਆਂ ਟਿੱਪਣੀਆਂ ਲਈ ਧੰਨਵਾਦ! ਇਹ ਮਨਜ਼ੂਰੀ ਮਿਲਣ ਦੇ ਬਾਅਦ ਸਾਈਟ 'ਤੇ ਦਿਖਾਇਆ ਜਾਵੇਗਾ।" + comment_error_msg : "ਮੁਆਫ ਕਰਨਾ, ਤੁਹਾਡੀ ਅਧੀਨਗੀ ਵਿੱਚ ਕੋਈ ਗਲਤੀ ਹੋਈ ਸੀ ਕਿਰਪਾ ਕਰਕੇ ਯਕੀਨੀ ਬਣਾਓ ਕਿ ਸਾਰੇ ਲੋੜੀਂਦੇ ਖੇਤਰ ਪੂਰੇ ਹੋ ਗਏ ਹਨ ਅਤੇ ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰੋ।" +pa-IN: + <<: *DEFAULT_PA + +# Another locale +# -------------- +# diff --git a/_includes/head.html b/_includes/head.html index 74a0c16..4924904 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -123,4 +123,9 @@ {% include matomo.html %} {% endif %} + + {% if page.comments and site.staticman.repository and site.staticman.branch %} + + {% endif %} + diff --git a/_includes/staticman-comment.html b/_includes/staticman-comment.html new file mode 100644 index 0000000..0e7728f --- /dev/null +++ b/_includes/staticman-comment.html @@ -0,0 +1,22 @@ + diff --git a/_includes/staticman-comments.html b/_includes/staticman-comments.html new file mode 100644 index 0000000..83f5c30 --- /dev/null +++ b/_includes/staticman-comments.html @@ -0,0 +1,72 @@ +{% if site.staticman.repository and site.staticman.branch %} +
+ +
+ {% if site.data.comments[page.slug] %} +

{{ 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 staticman-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" }} *

+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ + + + + {% if site.staticman.reCaptcha.siteKey %} +
+
+
+ {% endif %} +
+ +
+
+
+ + + {% if site.staticman.reCaptcha.siteKey %} + + {% endif %} +
+ + {% include staticman-script.html %} +{% endif %} diff --git a/_includes/staticman-script.html b/_includes/staticman-script.html new file mode 100644 index 0000000..4e9fcd9 --- /dev/null +++ b/_includes/staticman-script.html @@ -0,0 +1,47 @@ +{% if site.staticman.repository and site.staticman.branch %} + + + +{% endif %} diff --git a/_layouts/page.html b/_layouts/page.html index 9dff552..44a0d8d 100644 --- a/_layouts/page.html +++ b/_layouts/page.html @@ -13,6 +13,9 @@ layout: base {% include disqus.html %} {% include fb-comment.html %} +
+ {% include staticman-comments.html %} +
{% endif %} diff --git a/_layouts/post.html b/_layouts/post.html index fc546b9..731b96d 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -70,6 +70,9 @@ layout: base {% include disqus.html %} {% include fb-comment.html %} +
+ {% include staticman-comments.html %} +
{% endif %} diff --git a/_posts/2015-02-28-test-markdown.md b/_posts/2015-02-28-test-markdown.md index 08e2302..27bae28 100644 --- a/_posts/2015-02-28-test-markdown.md +++ b/_posts/2015-02-28-test-markdown.md @@ -5,6 +5,7 @@ subtitle: Each post also has a subtitle gh-repo: daattali/beautiful-jekyll gh-badge: [star, fork, follow] tags: [test] +comments: true --- You can write regular [markdown](http://markdowntutorial.com/) here and Jekyll will automatically convert it to a nice webpage. I strongly encourage you to [take 5 minutes to learn how to write in markdown](http://markdowntutorial.com/) - it'll teach you how to transform regular text into bold/italics/headings/tables/etc. diff --git a/css/staticman.css b/css/staticman.css new file mode 100644 index 0000000..3771595 --- /dev/null +++ b/css/staticman.css @@ -0,0 +1,187 @@ +/* ========================================================================== + Forms + ========================================================================== */ +.staticman-comments form { + margin: 0 0 5px 0; + padding: 1em; + background-color: #f2f3f3; +} +.staticman-comments form p { + margin-bottom: 2.5px; +} +.staticman-comments form br { + display: none; +} +.staticman-comments label, .staticman-comments input, .staticman-comments button, .staticman-comments textarea { + vertical-align: baseline; + vertical-align: middle; +} +.staticman-comments input, .staticman-comments button, .staticman-comments textarea { + box-sizing: border-box; +} +.staticman-comments label { + display: block; + margin-bottom: 0.25em; + color: #494e52; + cursor: pointer; +} +.staticman-comments label small { + font-size: 0.75em; +} +.staticman-comments label input, .staticman-comments label textarea { + display: block; +} +.staticman-comments input, .staticman-comments textarea { + display: inline-block; + width: 100%; + padding: 0.25em; + margin-bottom: 0.5em; + color: #494e52; + background-color: #fff; + border: #f2f3f3; + border-radius: 4px; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.125); +} +.staticman-comments .input-mini { + width: 60px; +} +.staticman-comments .input-small { + width: 90px; +} +.staticman-comments input[type="button"], .staticman-comments input[type="reset"], .staticman-comments input[type="submit"] { + width: auto; + height: auto; + cursor: pointer; + overflow: visible; +} +.staticman-comments textarea { + resize: vertical; + height: auto; + overflow: auto; + vertical-align: top; +} +.staticman-comments input[type="hidden"] { + display: none; +} +.staticman-comments .form { + position: relative; +} +/* + Disabled state + ========================================================================== */ +.staticman-comments input[disabled][disabled], .staticman-comments textarea[disabled], .staticman-comments input[readonly][readonly], .staticman-comments textarea[readonly] { + opacity: 0.5; + cursor: not-allowed; +} +/* + Focus & active state + ========================================================================== */ +.staticman-comments input:focus, .staticman-comments textarea:focus { + border-color: #7a8288; + outline: 0; + outline: thin dotted \9; + box-shadow: inset 0 1px 3px rgba(73, 78, 82, 0.06), 0 0 5px rgba(122, 130, 136, 0.7); +} +.staticman-comments input[type="file"]:focus, .staticman-comments input[type="radio"]:focus, .staticman-comments input[type="checkbox"]:focus:focus { + box-shadow: none; +} +/* + Help text + ========================================================================== */ +.staticman-comments .help-block { + color: #898c8e; +} +.staticman-comments .help-block { + display: block; + margin-bottom: 1em; + line-height: 1em; +} +/* + .form-group + ========================================================================== */ +.staticman-comments .form-group { + margin-bottom: 5px; + padding: 0; + border-width: 0; +} +/* + Comments + ========================================================================== */ +.staticman-comments .page__comments { + float: left; + margin-left: 0; + margin-right: 0; + width: 100%; + clear: both; +} +.staticman-comments .page__comments-title { + margin-top: 2rem; + margin-bottom: 10px; + padding-top: 2rem; + border-top: 1px solid #f2f3f3; +} +.staticman-comments .page__comments-form { + -webkit-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} +.staticman-comments .page__comments-form.disabled input, .staticman-comments .page__comments-form.disabled button, .staticman-comments .page__comments-form.disabled textarea, .staticman-comments .page__comments-form.disabled label { + pointer-events: none; + cursor: not-allowed; + filter: alpha(opacity=65); + box-shadow: none; + opacity: 0.65; +} +.staticman-comments .comment { + margin: 1em 0; +} +.staticman-comments .comment:not(:last-child) { + border-bottom: 1px solid #f2f3f3; +} +.staticman-comments .comment__avatar-wrapper { + float: left; + width: 60px; + height: 60px; +} +.staticman-comments .comment__avatar { + width: 40px; + height: 40px; + border-radius: 50%; +} +.staticman-comments .comment__content-wrapper { + width: calc(100% - 60px); +} +.staticman-comments .comment__author { + margin: 0; +} +.staticman-comments .comment__author a { + text-decoration: none; +} +.staticman-comments .comment__date { + margin: 0; +} +.staticman-comments .comment__date a { + text-decoration: none; +} +/* ========================================================================== + PRINT STYLES + ========================================================================== */ +.staticman-comments @media print { + /* + Hide the following elements on print + ========================================================================== */ +.staticman-comments [hidden] { + display: none; + } +.staticman-comments .masthead, .staticman-comments .toc, .staticman-comments .page__share, .staticman-comments .page__related, .staticman-comments .pagination, .staticman-comments .ads, .staticman-comments .page__footer, .staticman-comments .page__comments-form, .staticman-comments .author__avatar, .staticman-comments .author__content, .staticman-comments .author__urls-wrapper, .staticman-comments .nav__list, .staticman-comments .sidebar, .staticman-comments .adsbygoogle { + display: none !important; + height: 1px !important; + } +} +/* + Post pagination navigation links + ========================================================================== */ +.staticman-comments .page__comments + .staticman-comments .pagination { + margin-top: 2em; + padding-top: 2em; + border-top: 1px solid #f2f3f3; +} diff --git a/staticman.yml b/staticman.yml new file mode 100644 index 0000000..fbb2de2 --- /dev/null +++ b/staticman.yml @@ -0,0 +1,108 @@ +# Name of the property. You can have multiple properties with completely +# different config blocks for different sections of your site. +# For example, you can have one property to handle comment submission and +# another one to handle posts. +# To encrypt strings use the following endpoint: +# https://{STATICMAN API INSTANCE}/v3/encrypt/{TEXT TO BE ENCRYPTED} +# {STATICMAN API INSTANCE} defaults to staticman3.herokuapp.com + +comments: + # (*) REQUIRED + # + # Names of the fields the form is allowed to submit. If a field that is + # not here is part of the request, an error will be thrown. + allowedFields: ["name", "email", "url", "message"] + + # (*) REQUIRED WHEN USING NOTIFICATIONS + # + # When allowedOrigins is defined, only requests sent from one of the domains + # listed will be accepted. The origin is sent as part as the `options` object + # (e.g.