1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2026-05-07 17:28:39 +00:00
Files
jekyll-theme-chirpy/_includes/post-edit.html
T
2026-05-06 22:31:32 +08:00

24 lines
599 B
HTML

<!-- 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 %}