From 251e6705c2c611f7d5cd218e8a24a72732dd1d40 Mon Sep 17 00:00:00 2001 From: ericclose Date: Thu, 9 Apr 2020 00:03:52 +0800 Subject: [PATCH 1/2] add telegram share link --- _config.yml | 2 ++ layout/_third-party/share.ejs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/_config.yml b/_config.yml index 0e7d8b9..930033b 100755 --- a/_config.yml +++ b/_config.yml @@ -231,6 +231,8 @@ meta: img: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/logo/128/weibo.png # - id: qrcode # 当id为qrcode时需要安装插件 npm i -S hexo-helper-qrcode # img: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/logo/128/wechat.png + # - id: telegram + # img: https://img.icons8.com/color/144/000000/telegram-app.png # 链接 btns: edit: diff --git a/layout/_third-party/share.ejs b/layout/_third-party/share.ejs index 1f9bdd6..9d5724b 100644 --- a/layout/_third-party/share.ejs +++ b/layout/_third-party/share.ejs @@ -17,6 +17,8 @@ href="http://connect.qq.com/widget/shareqq/index.html?url=<%- post.permalink %>&title=<%- (post.title || post.seotitle) + ' - ' + config.title %><%- (post.thumbnail) ? '&pics=' + (post.thumbnail) : '' %>&summary=<%- strip_html(post.excerpt) %>" <% } else if (item.id == 'weibo'){ %> href="http://service.weibo.com/share/share.php?url=<%- post.permalink %>&title=<%- (post.title || post.seotitle) + ' - ' + config.title %><%- (post.thumbnail) ? '&pics=' + (post.thumbnail) : '' %>&summary=<%- strip_html(post.excerpt) %>" + <% } else if (item.id == 'telegram'){ %> + href="https://t.me/share/url?url=<%- post.permalink %>&text=<%- (post.title || post.seotitle) + ' - ' + config.title %>" <% } %> > <% if (item.img){ %> From 5886b36c6742db931b3b3867203a2fecf1c775c7 Mon Sep 17 00:00:00 2001 From: ericclose Date: Thu, 9 Apr 2020 11:02:08 +0800 Subject: [PATCH 2/2] move the telegram logo link --- _config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index 930033b..e58bc2a 100755 --- a/_config.yml +++ b/_config.yml @@ -232,7 +232,7 @@ meta: # - id: qrcode # 当id为qrcode时需要安装插件 npm i -S hexo-helper-qrcode # img: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/logo/128/wechat.png # - id: telegram - # img: https://img.icons8.com/color/144/000000/telegram-app.png + # img: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/logo/128/telegram.png # 链接 btns: edit: