Skip to content

Commit ead86cf

Browse files
authored
fix: add X social link (#1101)
fix: correct social share links
1 parent 43aec7e commit ead86cf

File tree

22 files changed

+65
-9
lines changed

22 files changed

+65
-9
lines changed

assets/icons/icons/faXTwitter.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// See @fortawesome/free-brands-svg-icons@6
2+
export default {
3+
prefix: "fab",
4+
iconName: "x-twitter",
5+
icon: [
6+
512,
7+
512,
8+
[],
9+
"e61b",
10+
[
11+
"M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z",
12+
],
13+
],
14+
};

assets/icons/icons/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ import faBilibili from "./faBilibili";
22
import faLiberapay from "./faLiberapay";
33
import faOffline from "./faOffline";
44
import faTipeee from "./faTipeee";
5+
import faXTwitter from "./faXTwitter"
56

6-
export { faBilibili, faLiberapay, faOffline, faTipeee };
7+
export { faBilibili, faLiberapay, faOffline, faTipeee, faXTwitter };

assets/icons/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ import {
101101
faUser,
102102
} from "@fortawesome/free-solid-svg-icons";
103103
import { default as customIcons } from "./custom";
104-
import { faBilibili, faLiberapay, faOffline, faTipeee } from "./icons";
104+
import { faBilibili, faLiberapay, faOffline, faTipeee, faXTwitter } from "./icons";
105105

106106
let icons = [
107107
// Solid Icons
@@ -212,6 +212,7 @@ let icons = [
212212
faLiberapay,
213213
faOffline,
214214
faTipeee,
215+
faXTwitter,
215216
];
216217

217218
config.searchPseudoElements = false; // This option will become a performance killer, especially in search page, it tooks a long time to render.

exampleSite/config/_default/params.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ github = "razonyang/hugo-theme-bootstrap"
308308
# linkedin = "yourlinkedinusername"
309309
# xing = "yourxingusername"
310310
# stackoverflow = "yourstackoverflowuserid"
311-
twitter = "razonyang"
311+
x = "razonyang"
312312
# weibo = "yourweibousername"
313313
# zhihu = "yourzhihuusername"
314314
# instagram = "yourinstagramusername"
@@ -356,7 +356,7 @@ location = "Earth"
356356
[author.social]
357357
email = "razonyang@gmail.com"
358358
github = "razonyang/hugo-theme-bootstrap"
359-
twitter = "razonyang"
359+
x = "razonyang"
360360
patreon = "razonyang"
361361
paypal = "razonyang"
362362
# rss = "" # Disable RSS link

exampleSite/content/docs/widgets/social-links/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ github = "githubusername"
7676
| `stackoverflow` | Stack Overflow User ID |
7777
| `tumblr` | Tumblr Username |
7878
| `twitter` | Twitter Username |
79+
| `x` | X username |
7980
| `weibo` | Weibo Username |
8081
| `zhihu` | Zhihu Username |
8182
| `reddit` | Reddit Username |

exampleSite/content/docs/widgets/social-links/index.zh-hans.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ github = "githubusername"
7676
| `stackoverflow` | Stack Overflow 用户 ID |
7777
| `tumblr` | Tumblr 用户名 |
7878
| `twitter` | Twitter 用户名 |
79+
| `x` | X 用户名 |
7980
| `weibo` | 微博用户名 |
8081
| `zhihu` | 知乎用户名 |
8182
| `reddit` | Reddit 用户名 |

exampleSite/content/docs/widgets/social-links/index.zh-hant.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ github = "githubusername"
7676
| `stackoverflow` | Stack Overflow 使用者 ID |
7777
| `tumblr` | Tumblr 使用者名稱 |
7878
| `twitter` | Twitter 使用者名稱 |
79+
| `x` | X 使用者名稱 |
7980
| `weibo` | 微博使用者名稱 |
8081
| `zhihu` | 知乎使用者名稱 |
8182
| `reddit` | Reddit 使用者名稱 |

i18n/ar.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,9 @@ other = "موقع الويب"
404404
[social_weibo]
405405
other = "ويبو"
406406

407+
[social_x]
408+
other = "X"
409+
407410
[social_xing]
408411
other = "XING"
409412

i18n/de.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,9 @@ other = "Website"
404404
[social_weibo]
405405
other = "Weibo"
406406

407+
[social_x]
408+
other = "X"
409+
407410
[social_xing]
408411
other = "XING"
409412

i18n/en.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,9 @@ other = "Website"
404404
[social_weibo]
405405
other = "Weibo"
406406

407+
[social_x]
408+
other = "X"
409+
407410
[social_xing]
408411
other = "XING"
409412

i18n/es.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,9 @@ other = "Página Web"
404404
[social_weibo]
405405
other = "Weibo"
406406

407+
[social_x]
408+
other = "X"
409+
407410
[social_xing]
408411
other = "XING"
409412

i18n/pl.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,9 @@ other = "Website"
404404
[social_weibo]
405405
other = "Weibo"
406406

407+
[social_x]
408+
other = "X"
409+
407410
[social_xing]
408411
other = "XING"
409412

i18n/ru.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,9 @@ other = "Сайт"
404404
[social_weibo]
405405
other = "Weibo"
406406

407+
[social_x]
408+
other = "X"
409+
407410
[social_xing]
408411
other = "XING"
409412

i18n/uk.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,9 @@ other = "Сайт"
404404
[social_weibo]
405405
other = "Weibo"
406406

407+
[social_x]
408+
other = "X"
409+
407410
[social_xing]
408411
other = "XING"
409412

i18n/zh-cn.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,9 @@ other = "站点"
388388
[social_weibo]
389389
other = "微博"
390390

391+
[social_x]
392+
other = "X"
393+
391394
[social_xing]
392395
other = "XING"
393396

i18n/zh-hans.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,9 @@ other = "站点"
388388
[social_weibo]
389389
other = "微博"
390390

391+
[social_x]
392+
other = "X"
393+
391394
[social_xing]
392395
other = "XING"
393396

i18n/zh-hant.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,9 @@ other = "站點"
388388
[social_weibo]
389389
other = "微博"
390390

391+
[social_x]
392+
other = "X"
393+
391394
[social_xing]
392395
other = "XING"
393396

i18n/zh-hk.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,9 @@ other = "站點"
388388
[social_weibo]
389389
other = "微博"
390390

391+
[social_x]
392+
other = "X"
393+
391394
[social_xing]
392395
other = "XING"
393396

i18n/zh-tw.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,9 @@ other = "站點"
388388
[social_weibo]
389389
other = "微博"
390390

391+
[social_x]
392+
other = "X"
393+
391394
[social_xing]
392395
other = "XING"
393396

layouts/partials/footer/actions-panel.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
<div class="offcanvas-body mt-2">
1313
{{- if (default true .Site.Params.socialShare) -}}
1414
<div class="social-share mb-4 d-flex overflow-auto">
15-
<a class="btn-social-share d-flex flex-column align-items-center me-3" rel="noopener noreferrer" aria-label="Twitter Share Button"
16-
target="_blank" href="https://twitter.com/intent/tweet?title={{ .Title }}&url={{ .RelPermalink | absURL }}">
17-
<i class="fab fa-2x fa-fw fa-twitter mb-2"></i> Twitter
15+
<a class="btn-social-share d-flex flex-column align-items-center me-3" rel="noopener noreferrer" aria-label="X Share Button"
16+
target="_blank" href="https://x.com/intent/tweet?title={{ .Title }}&url={{ .Permalink }}">
17+
<i class="fab fa-2x fa-fw fa-x-twitter mb-2"></i> X
1818
</a>
1919
<a class="btn-social-share d-flex flex-column align-items-center me-3" rel="noopener noreferrer" aria-label="Facebook Share Button"
20-
target="_blank" href="https://www.facebook.com/sharer/sharer.php?u={{ .RelPermalink | absURL }}">
20+
target="_blank" href="https://www.facebook.com/sharer/sharer.php?u={{ .Permalink }}">
2121
<i class="fab fa-2x fa-fw fa-facebook-f mb-2"></i> Facebook
2222
</a>
2323
</div>

layouts/partials/footer/main.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- partialCached "footer/actions-panel" . -}}
1+
{{- partial "footer/actions-panel" . -}}
22
<div class="row text-center{{ if .Site.Menus.footer }} text-lg-start{{ end }}">
33
<div class="col-12 mt-2{{ if .Site.Menus.footer }} col-lg-3{{ end }}">
44
<p class="mb-2">{{ .Site.Title }}</p>

layouts/partials/helpers/social-links.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"twitter" (dict "url" "https://twitter.com/%s" "color" "#1d9bf0")
3434
"website" (dict "url" "%s" "icon" "fas fa-link")
3535
"weibo" (dict "url" "https://weibo.com/%s" "color" "#e1162c")
36+
"x" (dict "url" "https://x.com/%s" "icon" "fab fa-x-twitter" "color" "#000000")
3637
"xing" (dict "url" "https://www.xing.com/profile/%s" "icon" "fab fa-xing")
3738
"youtube" (dict "url" "https://www.youtube.com/channel/%s" "icon" "fab fa-youtube" "color" "#ff0000")
3839
"zhihu" (dict "url" "https://www.zhihu.com/people/%s" "color" "#056de8")

0 commit comments

Comments
 (0)