1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2026-05-07 09:18:38 +00:00

feat: add edit this post link (#2517)

This commit is contained in:
Alexander Fuks
2026-05-06 18:31:32 +04:00
committed by GitHub
parent 2685b91957
commit 6bd446ccde
37 changed files with 91 additions and 10 deletions
+10
View File
@@ -108,6 +108,16 @@ social_preview_image: # string, local or CORS resources
# boolean type, the global switch for TOC in posts.
toc: true
actions:
# Display "Edit this post" action on each post page to encourage contributions.
edit_post:
enabled: false # set to true to display the "Edit this post" action.
url: "" # repository base URL, e.g. https://github.com/cotes2020/jekyll-theme-chirpy/edit/master
# Use dynamic or static URL for the edit link.
# If `static_url` is false, the post's path will be appended to the `url` above as the final edit link.
# Set to true if the URL should remain unchanged, which means each post will share the same edit link.
static_url: false # [ true | false ]
comments:
# Global switch for the post-comment system. Keeping it empty means disabled.
provider: # [disqus | utterances | giscus]
+1
View File
@@ -60,6 +60,7 @@ post:
read_time:
unit: دقيقة
prompt: قراءة
edit: حرر هذا المنشور
relate_posts: إقرأ المزيد
share: شارك
button:
+1
View File
@@ -60,6 +60,7 @@ post:
read_time:
unit: мин
prompt: четиво
edit: Редактирай тази публикация
relate_posts: Още за четене
share: Споделете
button:
+1
View File
@@ -60,6 +60,7 @@ post:
read_time:
unit: min
prompt: " de lectura"
edit: Edita aquesta entrada
relate_posts: Entrades relacionades
share: Compartir
button:
+1
View File
@@ -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:
+1
View File
@@ -60,6 +60,7 @@ post:
read_time:
unit: min
prompt: læsetid
edit: Rediger dette opslag
relate_posts: Læs videre
share: Del
button:
+1
View File
@@ -59,6 +59,7 @@ post:
read_time:
unit: Minuten
prompt: Lesezeit
edit: Diesen Eintrag bearbeiten
relate_posts: Weiterlesen
share: Teilen
button:
+1
View File
@@ -60,6 +60,7 @@ post:
read_time:
unit: މިނެޓް
prompt: އިސްކާރު
edit: މި ޕޯސްޓް އެޑިޓް ކުރު
relate_posts: އެއްޗެހި ފަހުރަށްދަން
share: ސެއާރް
button:
+1
View File
@@ -60,6 +60,7 @@ post:
read_time:
unit: Λεπτά
prompt: διαβάσματος
edit: Επεξεργασία αυτής της δημοσίευσης
relate_posts: Περισσότερα
share: Κοινοποιήστε
button:
+1
View File
@@ -60,6 +60,7 @@ post:
read_time:
unit: min
prompt: read
edit: Edit this post
relate_posts: Further Reading
share: Share
button:
+1
View File
@@ -60,6 +60,7 @@ post:
read_time:
unit: min
prompt: " de lectura"
edit: Edita esta entrada
relate_posts: Lecturas adicionales
share: Compartir
button:
+1
View File
@@ -60,6 +60,7 @@ post:
read_time:
unit: "دقیقه "
prompt: " زمان مطالعه"
edit: ویرایش این پست
relate_posts: بیشتر بخوانید
share: اشتراک‌گذاری
button:
+1
View File
@@ -59,6 +59,7 @@ post:
read_time:
unit: minuuttia
prompt: lukea
edit: Muokkaa tätä julkaisua
relate_posts: Jatka lukemista
share: Jaa
button:
+1
View File
@@ -60,6 +60,7 @@ post:
read_time:
unit: min
prompt: lire
edit: Modifier cet article
relate_posts: Autres lectures
share: Partager
button:
+1
View File
@@ -61,6 +61,7 @@ post:
read_time:
unit: perc
prompt: elolvasni
edit: Szerkesztés
relate_posts: További olvasnivaló
share: Megosztás
button:
+1
View File
@@ -60,6 +60,7 @@ post:
read_time:
unit: menit
prompt: baca
edit: Sunting entri ini
relate_posts: Postingan Lainya
share: Bagikan
button:
+1
View File
@@ -59,6 +59,7 @@ post:
read_time:
unit: min
prompt: lettura
edit: Modifica questo post
relate_posts: Continua a leggere
share: Condividi
button:
+1
View File
@@ -60,6 +60,7 @@ post:
read_time:
unit:
prompt: で読めます
edit: この投稿を編集
relate_posts: さらに読む
share: シェア
button:
+1
View File
@@ -60,6 +60,7 @@ post:
read_time:
unit:
prompt: 읽는 시간
edit: 이 글 편집
relate_posts: 관련된 글
share: 공유하기
button:
+1
View File
@@ -60,6 +60,7 @@ post:
read_time:
unit: خولەک
prompt: خوێندنەوە
edit: ئەم بابەتە دەستکاری بکە
relate_posts: بابەتی پەیوەندیدار
share: بڵاوکردنەوە
button:
+1
View File
@@ -60,6 +60,7 @@ post:
read_time:
unit: မိနစ်
prompt: ဖတ်ပါမည်
edit: ဤပို့စ်ကို တည်းဖြတ်ပါ
relate_posts: နောက်ထပ်ဖတ်ရန်
share: မျှဝေရန်
button:
+1
View File
@@ -59,6 +59,7 @@ post:
read_time:
unit: min
prompt: lees
edit: Bewerk dit bericht
relate_posts: Verder Lezen
share: Deel
button:
+1
View File
@@ -60,6 +60,7 @@ post:
read_time:
unit: دقیقې
prompt: لوستل
edit: دغه لیکنه سمول
relate_posts: نوره لوستنه
share: شریکول
button:
+1
View File
@@ -60,6 +60,7 @@ post:
read_time:
unit: min
prompt: " de leitura"
edit: Editar esta postagem
relate_posts: Leia também
share: Compartilhar
button:
+1
View File
@@ -59,6 +59,7 @@ post:
read_time:
unit: мин.
prompt: чтения
edit: Редактировать этот пост
relate_posts: Похожие посты
share: Поделиться
button:
+1
View File
@@ -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:
+1
View File
@@ -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:
+1
View File
@@ -60,6 +60,7 @@ post:
read_time:
unit: นาที
prompt: อ่าน
edit: แก้ไขโพสต์นี้
relate_posts: อ่านต่อ
share: แชร์
button:
+1
View File
@@ -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:
+1
View File
@@ -60,6 +60,7 @@ post:
read_time:
unit: хвилин
prompt: читання
edit: Редагувати цей пост
relate_posts: Вас також може зацікавити
share: Поділитися
button:
+1
View File
@@ -60,6 +60,7 @@ post:
read_time:
unit: منٹ
prompt: پڑھیں
edit: اس تحریر میں ترمیم کریں
relate_posts: مزید مطالعہ
share: شیئر
button:
+1
View File
@@ -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:
+1
View File
@@ -59,6 +59,7 @@ post:
read_time:
unit: 分钟
prompt: 阅读
edit: 编辑此文
relate_posts: 相关文章
share: 分享
button:
+1
View File
@@ -59,6 +59,7 @@ post:
read_time:
unit: 分鐘
prompt: 閱讀
edit: 編輯此文
relate_posts: 相關文章
share: 分享
button:
+23
View File
@@ -0,0 +1,23 @@
<!-- Link to edit the post to contribute. -->
{% assign enabled = site.actions.edit_post.enabled %}
{% assign url = site.actions.edit_post.url %}
{% assign static_url = site.actions.edit_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"
rel="noopener"
>
<i class="fa fa-pen fa-fw me-1"></i>
<span>{{ edit }}</span>
</a>
</div>
{% endif %}
+6 -1
View File
@@ -126,9 +126,10 @@ script_includes:
</div>
<div class="post-tail-wrapper text-muted">
<div class="d-flex justify-content-between align-items-center gap-3 mb-3">
<!-- categories -->
{% if page.categories.size > 0 %}
<div class="post-meta mb-3">
<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>
@@ -137,6 +138,10 @@ script_includes:
</div>
{% endif %}
<!-- "Edit this post" link -->
{% include post-edit.html lang=lang %}
</div>
<!-- tags -->
{% if page.tags.size > 0 %}
<div class="post-tags">
+10
View File
@@ -148,6 +148,16 @@ header {
}
}
.post-edit {
line-height: 1.2rem;
> a {
&:hover {
@extend %link-hover;
}
}
}
.post-navigation {
@include bp.lt(bp.get(lg)) {
@include mx.pl-pr(0);