Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions _data/edit-this-post.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# "Edit this post" options at the bottom of the post.

enabled: false # set to true to display the "Edit this post" link
url: "" # the repository base URL, e.g. https://github.com/cotes2020/jekyll-theme-chirpy/tree/master
static_url: false # set to true if the URL should remain exactly as defined above for all posts
1 change: 1 addition & 0 deletions _data/locales/ar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ post:
read_time:
unit: دقيقة
prompt: قراءة
edit: حرر هذا المنشور
relate_posts: إقرأ المزيد
share: شارك
button:
Expand Down
1 change: 1 addition & 0 deletions _data/locales/bg-BG.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ post:
read_time:
unit: мин
prompt: четиво
edit: Редактирай тази публикация
relate_posts: Още за четене
share: Споделете
button:
Expand Down
1 change: 1 addition & 0 deletions _data/locales/ca-ES.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ post:
read_time:
unit: min
prompt: " de lectura"
edit: Edita aquesta entrada
relate_posts: Entrades relacionades
share: Compartir
button:
Expand Down
1 change: 1 addition & 0 deletions _data/locales/cs-CZ.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ post:
read_time:
unit: minut
prompt: čtení
edit: Uprav tento příspěvek
relate_posts: Další čtení
share: Sdílet
button:
Expand Down
1 change: 1 addition & 0 deletions _data/locales/da-DK.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ post:
read_time:
unit: min
prompt: læsetid
edit: Rediger dette opslag
relate_posts: Læs videre
share: Del
button:
Expand Down
1 change: 1 addition & 0 deletions _data/locales/de-DE.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ post:
read_time:
unit: Minuten
prompt: Lesezeit
edit: Diesen Eintrag bearbeiten
relate_posts: Weiterlesen
share: Teilen
button:
Expand Down
1 change: 1 addition & 0 deletions _data/locales/dv‑MV.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ post:
read_time:
unit: މިނެޓް
prompt: އިސްކާރު
edit: މި ޕޯސްޓް އެޑިޓް ކުރު
relate_posts: އެއްޗެހި ފަހުރަށްދަން
share: ސެއާރް
button:
Expand Down
1 change: 1 addition & 0 deletions _data/locales/el-GR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ post:
read_time:
unit: Λεπτά
prompt: διαβάσματος
edit: Επεξεργασία αυτής της δημοσίευσης
relate_posts: Περισσότερα
share: Κοινοποιήστε
button:
Expand Down
1 change: 1 addition & 0 deletions _data/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ post:
read_time:
unit: min
prompt: read
edit: Edit this post
relate_posts: Further Reading
share: Share
button:
Expand Down
1 change: 1 addition & 0 deletions _data/locales/es-ES.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ post:
read_time:
unit: min
prompt: " de lectura"
edit: Edita esta entrada
relate_posts: Lecturas adicionales
share: Compartir
button:
Expand Down
1 change: 1 addition & 0 deletions _data/locales/fa-IR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ post:
read_time:
unit: "دقیقه "
prompt: " زمان مطالعه"
edit: ویرایش این پست
relate_posts: بیشتر بخوانید
share: اشتراک‌گذاری
button:
Expand Down
1 change: 1 addition & 0 deletions _data/locales/fi-FI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ post:
read_time:
unit: minuuttia
prompt: lukea
edit: Muokkaa tätä julkaisua
relate_posts: Jatka lukemista
share: Jaa
button:
Expand Down
1 change: 1 addition & 0 deletions _data/locales/fr-FR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ post:
read_time:
unit: min
prompt: lire
edit: Modifier cet article
relate_posts: Autres lectures
share: Partager
button:
Expand Down
1 change: 1 addition & 0 deletions _data/locales/hu-HU.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ post:
read_time:
unit: perc
prompt: elolvasni
edit: Szerkesztés
relate_posts: További olvasnivaló
share: Megosztás
button:
Expand Down
1 change: 1 addition & 0 deletions _data/locales/id-ID.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ post:
read_time:
unit: menit
prompt: baca
edit: Sunting entri ini
relate_posts: Postingan Lainya
share: Bagikan
button:
Expand Down
1 change: 1 addition & 0 deletions _data/locales/it-IT.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ post:
read_time:
unit: min
prompt: lettura
edit: Modifica questo post
relate_posts: Continua a leggere
share: Condividi
button:
Expand Down
1 change: 1 addition & 0 deletions _data/locales/ja-JP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ post:
read_time:
unit: 分
prompt: で読めます
edit: この投稿を編集
relate_posts: さらに読む
share: シェア
button:
Expand Down
1 change: 1 addition & 0 deletions _data/locales/ko-KR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ post:
read_time:
unit: 분
prompt: 읽는 시간
edit: 이 글 편집
relate_posts: 관련된 글
share: 공유하기
button:
Expand Down
1 change: 1 addition & 0 deletions _data/locales/ku-IQ.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ post:
read_time:
unit: خولەک
prompt: خوێندنەوە
edit: ئەم بابەتە دەستکاری بکە
relate_posts: بابەتی پەیوەندیدار
share: بڵاوکردنەوە
button:
Expand Down
1 change: 1 addition & 0 deletions _data/locales/my-MM.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ post:
read_time:
unit: မိနစ်
prompt: ဖတ်ပါမည်
edit: ဤပို့စ်ကို တည်းဖြတ်ပါ
relate_posts: နောက်ထပ်ဖတ်ရန်
share: မျှဝေရန်
button:
Expand Down
1 change: 1 addition & 0 deletions _data/locales/nl-NL.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ post:
read_time:
unit: min
prompt: lees
edit: Bewerk dit bericht
relate_posts: Verder Lezen
share: Deel
button:
Expand Down
1 change: 1 addition & 0 deletions _data/locales/ps‑AF.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ post:
read_time:
unit: دقیقې
prompt: لوستل
edit: دغه لیکنه سمول
relate_posts: نوره لوستنه
share: شریکول
button:
Expand Down
1 change: 1 addition & 0 deletions _data/locales/pt-BR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ post:
read_time:
unit: min
prompt: " de leitura"
edit: Editar esta postagem
relate_posts: Leia também
share: Compartilhar
button:
Expand Down
1 change: 1 addition & 0 deletions _data/locales/ru-RU.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ post:
read_time:
unit: мин.
prompt: чтения
edit: Редактировать этот пост
relate_posts: Похожие посты
share: Поделиться
button:
Expand Down
1 change: 1 addition & 0 deletions _data/locales/sl-SI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ post:
read_time:
unit: min
prompt: beri #read
edit: Uredi to objavo #Edit this post
relate_posts: Nadaljnje branje #Further Reading
share: Deli #Share
button:
Expand Down
1 change: 1 addition & 0 deletions _data/locales/sv-SE.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ post:
read_time:
unit: min
prompt: läsning
edit: Redigera detta inlägg
relate_posts: Mer läsning
share: Dela
button:
Expand Down
1 change: 1 addition & 0 deletions _data/locales/th.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ post:
read_time:
unit: นาที
prompt: อ่าน
edit: แก้ไขโพสต์นี้
relate_posts: อ่านต่อ
share: แชร์
button:
Expand Down
1 change: 1 addition & 0 deletions _data/locales/tr-TR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ post:
read_time:
unit: dakikada
prompt: okunabilir
edit: Bu gönderiyi düzenle
relate_posts: Benzer Gönderiler
share: Paylaş
button:
Expand Down
1 change: 1 addition & 0 deletions _data/locales/uk-UA.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ post:
read_time:
unit: хвилин
prompt: читання
edit: Редагувати цей пост
relate_posts: Вас також може зацікавити
share: Поділитися
button:
Expand Down
1 change: 1 addition & 0 deletions _data/locales/ur-PK.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ post:
read_time:
unit: منٹ
prompt: پڑھیں
edit: اس تحریر میں ترمیم کریں
relate_posts: مزید مطالعہ
share: شیئر
button:
Expand Down
1 change: 1 addition & 0 deletions _data/locales/vi-VN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ post:
read_time:
unit: phút
prompt: đọc
edit: Chỉnh sửa bài viết này
relate_posts: Bài viết liên quan
share: Chia sẻ
button:
Expand Down
1 change: 1 addition & 0 deletions _data/locales/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ post:
read_time:
unit: 分钟
prompt: 阅读
edit: 编辑此文
relate_posts: 相关文章
share: 分享
button:
Expand Down
1 change: 1 addition & 0 deletions _data/locales/zh-TW.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ post:
read_time:
unit: 分鐘
prompt: 閱讀
edit: 編輯此文
relate_posts: 相關文章
share: 分享
button:
Expand Down
21 changes: 21 additions & 0 deletions _includes/post-edit.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!-- Link to edit the post at the bottom of the post. -->

{% assign enabled = site.data.edit-this-post.enabled %}
{% assign url = site.data.edit-this-post.url %}
{% assign static_url = site.data.edit-this-post.static_url %}

{% unless static_url %}
{% assign url = url | append: '/' | append: page.path %}
{% endunless %}

{% if enabled %}
<div class="post-edit">
{% assign edit = site.data.locales[include.lang].post.edit %}
<a
href="{{ url }}"
target="_blank"
>
<i class="far fa-edit fa-fw me-1"></i> {{ edit }}
</a>
</div>
{% endif %}
25 changes: 15 additions & 10 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,21 @@ <h1 data-toc-skip>{{ page.title }}</h1>
</div>

<div class="post-tail-wrapper text-muted">
<!-- categories -->
{% if page.categories.size > 0 %}
<div class="post-meta mb-3">
<i class="far fa-folder-open fa-fw me-1"></i>
{% for category in page.categories %}
<a href="{{ site.baseurl }}/categories/{{ category | slugify | url_encode }}/">{{ category }}</a>
{%- unless forloop.last -%},{%- endunless -%}
{% endfor %}
</div>
{% endif %}
<div class="d-flex justify-content-between mb-3">
<!-- categories -->
{% if page.categories.size > 0 %}
<div class="post-meta">
<i class="far fa-folder-open fa-fw me-1"></i>
{% for category in page.categories %}
<a href="{{ site.baseurl }}/categories/{{ category | slugify | url_encode }}/">{{ category }}</a>
{%- unless forloop.last -%},{%- endunless -%}
{% endfor %}
</div>
{% endif %}

<!-- "Edit this post" link -->
{% include post-edit.html lang=lang %}
</div>

<!-- tags -->
{% if page.tags.size > 0 %}
Expand Down
10 changes: 10 additions & 0 deletions _sass/pages/_post.scss
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,16 @@ header {
}
}

.post-edit {
line-height: 2rem;

> a {
&:hover {
@extend %link-hover;
}
}
}

.post-navigation {
@include bp.lt(bp.get(lg)) {
@include mx.pl-pr(0);
Expand Down