1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-18 05:41:31 +00:00

Update locale settings for code block clipboard (resolve #408)

This commit is contained in:
Cotes Chung
2021-09-15 15:02:23 +08:00
parent 53b0329e5a
commit 34631a0c30
7 changed files with 10 additions and 15 deletions

View File

@@ -116,7 +116,9 @@
{% capture _tag_head %}<div class="language-{% endcapture %}
{% assign _replacement = '-rouge"><div class="code-header" data-lang="'
| append: _lang
| append: '"><button><i class="far fa-clone"></i></button></div><div class="highlight">'
| append: '"><button data-original-title="'
| append: site.data.locales[lang].post.button.copy
| append: '"><i class="far fa-clone"></i></button></div><div class="highlight">'
%}
{% capture _tag_tail %}{{ _snippet | replace: '-rouge"><div class="highlight">', _replacement }}{% endcapture %}
{% assign _new_content = _new_content | append: _tag_head | append: _tag_tail %}