From 0aaa74c5ca8c3cd97bdd781d4d9a37f0f5b751a7 Mon Sep 17 00:00:00 2001 From: Vincent Tam Date: Thu, 20 Dec 2018 07:45:27 +0100 Subject: [PATCH 01/12] Added Staicman support --- _config.yml | 9 + _data/ui-text.yml | 494 +++++++++++++++++++++++++++++ _includes/head.html | 5 + _includes/staticman-comment.html | 22 ++ _includes/staticman-comments.html | 72 +++++ _includes/staticman-script.html | 47 +++ _layouts/page.html | 3 + _layouts/post.html | 3 + _posts/2015-02-28-test-markdown.md | 1 + css/staticman.css | 187 +++++++++++ staticman.yml | 105 ++++++ 11 files changed, 948 insertions(+) create mode 100644 _data/ui-text.yml create mode 100644 _includes/staticman-comment.html create mode 100644 _includes/staticman-comments.html create mode 100644 _includes/staticman-script.html create mode 100644 css/staticman.css create mode 100644 staticman.yml diff --git a/_config.yml b/_config.yml index a300d0d821e2..63cdf032d8fa 100644 --- a/_config.yml +++ b/_config.yml @@ -129,6 +129,15 @@ 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: + siteKey : + secret : + # --- Misc --- # # Facebook App ID diff --git a/_data/ui-text.yml b/_data/ui-text.yml new file mode 100644 index 000000000000..bb67a150b887 --- /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 74a0c16cb6c1..eab818f6bc40 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -122,5 +122,10 @@ {% if site.matomo %} {% 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 000000000000..0e7728fb3bba --- /dev/null +++ b/_includes/staticman-comment.html @@ -0,0 +1,22 @@ +
+
+ {{ include.name }} +
+
+ +

+ {% if include.date %} + {% if include.index %}{% endif %} + {% endif %} +

+
{{ include.message | markdownify }}
+
+
diff --git a/_includes/staticman-comments.html b/_includes/staticman-comments.html new file mode 100644 index 000000000000..e5af463f22a3 --- /dev/null +++ b/_includes/staticman-comments.html @@ -0,0 +1,72 @@ +{% if page.comments and 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.reCaptcha.siteKey %} +
+
+
+ {% endif %} +
+ +
+
+
+ + + {% if site.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 000000000000..edc003190dcd --- /dev/null +++ b/_includes/staticman-script.html @@ -0,0 +1,47 @@ +{% if page.comments and site.staticman.repository and site.staticman.branch %} + + + +{% endif %} diff --git a/_layouts/page.html b/_layouts/page.html index 9dff55294359..44a0d8daa80d 100644 --- a/_layouts/page.html +++ b/_layouts/page.html @@ -13,6 +13,9 @@ {% include disqus.html %} {% include fb-comment.html %} +
+ {% include staticman-comments.html %} +
{% endif %} diff --git a/_layouts/post.html b/_layouts/post.html index fc546b94f5f3..731b96ddf4fe 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -70,6 +70,9 @@ {% 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 08e23027d754..27bae2835d1b 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 000000000000..c9342e495deb --- /dev/null +++ b/css/staticman.css @@ -0,0 +1,187 @@ +/* ========================================================================== + Forms + ========================================================================== */ +form { + margin: 0 0 5px 0; + padding: 1em; + background-color: #f2f3f3; +} +form p { + margin-bottom: 2.5px; +} +form br { + display: none; +} +label, input, button, textarea { + vertical-align: baseline; + vertical-align: middle; +} +input, button, textarea { + box-sizing: border-box; +} +label { + display: block; + margin-bottom: 0.25em; + color: #494e52; + cursor: pointer; +} +label small { + font-size: 0.75em; +} +label input, label textarea, { + display: block; +} +input, 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); +} +.input-mini { + width: 60px; +} +.input-small { + width: 90px; +} +input[type="button"], input[type="reset"], input[type="submit"] { + width: auto; + height: auto; + cursor: pointer; + overflow: visible; +} +textarea { + resize: vertical; + height: auto; + overflow: auto; + vertical-align: top; +} +input[type="hidden"] { + display: none; +} +.form { + position: relative; +} +/* + Disabled state + ========================================================================== */ +input[disabled][disabled], textarea[disabled], input[readonly][readonly], textarea[readonly] { + opacity: 0.5; + cursor: not-allowed; +} +/* + Focus & active state + ========================================================================== */ +input:focus, 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); +} +input[type="file"]:focus, input[type="radio"]:focus, input[type="checkbox"]:focus:focus { + box-shadow: none; +} +/* + Help text + ========================================================================== */ +.help-block { + color: #898c8e; +} +.help-block { + display: block; + margin-bottom: 1em; + line-height: 1em; +} +/* + .form-group + ========================================================================== */ +.form-group { + margin-bottom: 5px; + padding: 0; + border-width: 0; +} +/* + Comments + ========================================================================== */ +.page__comments { + float: left; + margin-left: 0; + margin-right: 0; + width: 100%; + clear: both; +} +.page__comments-title { + margin-top: 2rem; + margin-bottom: 10px; + padding-top: 2rem; + border-top: 1px solid #f2f3f3; +} +.page__comments-form { + -webkit-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} +.page__comments-form.disabled input, .page__comments-form.disabled button, .page__comments-form.disabled textarea, .page__comments-form.disabled label { + pointer-events: none; + cursor: not-allowed; + filter: alpha(opacity=65); + box-shadow: none; + opacity: 0.65; +} +.comment { + margin: 1em 0; +} +.comment:not(:last-child) { + border-bottom: 1px solid #f2f3f3; +} +.comment__avatar-wrapper { + float: left; + width: 60px; + height: 60px; +} +.comment__avatar { + width: 40px; + height: 40px; + border-radius: 50%; +} +.comment__content-wrapper { + width: calc(100% - 60px); +} +.comment__author { + margin: 0; +} +.comment__author a { + text-decoration: none; +} +.comment__date { + margin: 0; +} +.comment__date a { + text-decoration: none; +} +/* ========================================================================== + PRINT STYLES + ========================================================================== */ +@media print { + /* + Hide the following elements on print + ========================================================================== */ + [hidden] { + display: none; + } + .masthead, .toc, .page__share, .page__related, .pagination, .ads, .page__footer, .page__comments-form, .author__avatar, .author__content, .author__urls-wrapper, .nav__list, .sidebar, .adsbygoogle { + display: none !important; + height: 1px !important; + } +} +/* + Post pagination navigation links + ========================================================================== */ +.page__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 000000000000..543794cbd7d8 --- /dev/null +++ b/staticman.yml @@ -0,0 +1,105 @@ +# 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. Date: Thu, 20 Dec 2018 11:27:44 +0100 Subject: [PATCH 02/12] Corrected template for staticman.yml --- staticman.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/staticman.yml b/staticman.yml index 543794cbd7d8..1c3b27b8a073 100644 --- a/staticman.yml +++ b/staticman.yml @@ -24,7 +24,8 @@ comments: # # Name of the branch being used. Must match the one sent in the URL of the # request. - branch: "gh-pages" + branch: "master" # use "master" for user page + #branch: "gh-pages" # use "gh-pages" for project page commitMessage: "New comment by {fields.name}" From 94c54b0e97928253feb1b3fda7931a64156837e0 Mon Sep 17 00:00:00 2001 From: Vincent Tam Date: Thu, 20 Dec 2018 11:43:44 +0100 Subject: [PATCH 03/12] Edit for coherence with _includes/disqus.html --- _includes/staticman-comments.html | 2 +- _includes/staticman-script.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/_includes/staticman-comments.html b/_includes/staticman-comments.html index e5af463f22a3..6a44bc690f5c 100644 --- a/_includes/staticman-comments.html +++ b/_includes/staticman-comments.html @@ -1,4 +1,4 @@ -{% if page.comments and site.staticman.repository and site.staticman.branch %} +{% if site.staticman.repository and site.staticman.branch %}
diff --git a/_includes/staticman-script.html b/_includes/staticman-script.html index edc003190dcd..4e9fcd908f3f 100644 --- a/_includes/staticman-script.html +++ b/_includes/staticman-script.html @@ -1,4 +1,4 @@ -{% if page.comments and site.staticman.repository and site.staticman.branch %} +{% if site.staticman.repository and site.staticman.branch %} {% endif %}
From dcaeaf34ec1b0ee2e1f35f547b118cbca2c14907 Mon Sep 17 00:00:00 2001 From: Vincent Tam Date: Mon, 24 Dec 2018 15:49:40 +0100 Subject: [PATCH 10/12] Prepend all css selectors with .staticman-comments Edit suggested by theme owner to avoid CSS rules overriding. --- css/staticman.css | 78 +++++++++++++++++++++++------------------------ 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/css/staticman.css b/css/staticman.css index c9342e495deb..37715953d159 100644 --- a/css/staticman.css +++ b/css/staticman.css @@ -1,37 +1,37 @@ -/* ========================================================================== +/* ========================================================================== Forms ========================================================================== */ -form { +.staticman-comments form { margin: 0 0 5px 0; padding: 1em; background-color: #f2f3f3; } -form p { +.staticman-comments form p { margin-bottom: 2.5px; } -form br { +.staticman-comments form br { display: none; } -label, input, button, textarea { +.staticman-comments label, .staticman-comments input, .staticman-comments button, .staticman-comments textarea { vertical-align: baseline; vertical-align: middle; } -input, button, textarea { +.staticman-comments input, .staticman-comments button, .staticman-comments textarea { box-sizing: border-box; } -label { +.staticman-comments label { display: block; margin-bottom: 0.25em; color: #494e52; cursor: pointer; } -label small { +.staticman-comments label small { font-size: 0.75em; } -label input, label textarea, { +.staticman-comments label input, .staticman-comments label textarea { display: block; } -input, textarea { +.staticman-comments input, .staticman-comments textarea { display: inline-block; width: 100%; padding: 0.25em; @@ -42,56 +42,56 @@ input, textarea { border-radius: 4px; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.125); } -.input-mini { +.staticman-comments .input-mini { width: 60px; } -.input-small { +.staticman-comments .input-small { width: 90px; } -input[type="button"], input[type="reset"], input[type="submit"] { +.staticman-comments input[type="button"], .staticman-comments input[type="reset"], .staticman-comments input[type="submit"] { width: auto; height: auto; cursor: pointer; overflow: visible; } -textarea { +.staticman-comments textarea { resize: vertical; height: auto; overflow: auto; vertical-align: top; } -input[type="hidden"] { +.staticman-comments input[type="hidden"] { display: none; } -.form { +.staticman-comments .form { position: relative; } /* Disabled state ========================================================================== */ -input[disabled][disabled], textarea[disabled], input[readonly][readonly], textarea[readonly] { +.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 ========================================================================== */ -input:focus, textarea:focus { +.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); } -input[type="file"]:focus, input[type="radio"]:focus, input[type="checkbox"]:focus:focus { +.staticman-comments input[type="file"]:focus, .staticman-comments input[type="radio"]:focus, .staticman-comments input[type="checkbox"]:focus:focus { box-shadow: none; } /* Help text ========================================================================== */ -.help-block { +.staticman-comments .help-block { color: #898c8e; } -.help-block { +.staticman-comments .help-block { display: block; margin-bottom: 1em; line-height: 1em; @@ -99,7 +99,7 @@ input[type="file"]:focus, input[type="radio"]:focus, input[type="checkbox"]:focu /* .form-group ========================================================================== */ -.form-group { +.staticman-comments .form-group { margin-bottom: 5px; padding: 0; border-width: 0; @@ -107,72 +107,72 @@ input[type="file"]:focus, input[type="radio"]:focus, input[type="checkbox"]:focu /* Comments ========================================================================== */ -.page__comments { +.staticman-comments .page__comments { float: left; margin-left: 0; margin-right: 0; width: 100%; clear: both; } -.page__comments-title { +.staticman-comments .page__comments-title { margin-top: 2rem; margin-bottom: 10px; padding-top: 2rem; border-top: 1px solid #f2f3f3; } -.page__comments-form { +.staticman-comments .page__comments-form { -webkit-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out; } -.page__comments-form.disabled input, .page__comments-form.disabled button, .page__comments-form.disabled textarea, .page__comments-form.disabled label { +.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; } -.comment { +.staticman-comments .comment { margin: 1em 0; } -.comment:not(:last-child) { +.staticman-comments .comment:not(:last-child) { border-bottom: 1px solid #f2f3f3; } -.comment__avatar-wrapper { +.staticman-comments .comment__avatar-wrapper { float: left; width: 60px; height: 60px; } -.comment__avatar { +.staticman-comments .comment__avatar { width: 40px; height: 40px; border-radius: 50%; } -.comment__content-wrapper { +.staticman-comments .comment__content-wrapper { width: calc(100% - 60px); } -.comment__author { +.staticman-comments .comment__author { margin: 0; } -.comment__author a { +.staticman-comments .comment__author a { text-decoration: none; } -.comment__date { +.staticman-comments .comment__date { margin: 0; } -.comment__date a { +.staticman-comments .comment__date a { text-decoration: none; } /* ========================================================================== PRINT STYLES ========================================================================== */ -@media print { +.staticman-comments @media print { /* Hide the following elements on print ========================================================================== */ - [hidden] { +.staticman-comments [hidden] { display: none; } - .masthead, .toc, .page__share, .page__related, .pagination, .ads, .page__footer, .page__comments-form, .author__avatar, .author__content, .author__urls-wrapper, .nav__list, .sidebar, .adsbygoogle { +.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; } @@ -180,7 +180,7 @@ input[type="file"]:focus, input[type="radio"]:focus, input[type="checkbox"]:focu /* Post pagination navigation links ========================================================================== */ -.page__comments + .pagination { +.staticman-comments .page__comments + .staticman-comments .pagination { margin-top: 2em; padding-top: 2em; border-top: 1px solid #f2f3f3; From 8c616968fd886c1c0e26237018110b4de5c5b78e Mon Sep 17 00:00:00 2001 From: Vincent Tam Date: Mon, 24 Dec 2018 16:16:03 +0100 Subject: [PATCH 11/12] Add myself to the change log --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fff28c5e28c4..33fb2b70b233 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) From 60f1eb58bf9217555b1337f164342b635459d63f Mon Sep 17 00:00:00 2001 From: Dean Attali Date: Tue, 25 Dec 2018 17:19:55 -0500 Subject: [PATCH 12/12] Update _config.yml --- _config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/_config.yml b/_config.yml index 44dea7ea763e..8acfb65cd2ee 100644 --- a/_config.yml +++ b/_config.yml @@ -135,6 +135,7 @@ staticman: 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}