Skip to content

Commit 71f1ace

Browse files
authored
feat: add support for Codeberg social link (#1128)
Closes #1127
1 parent 95d9e7f commit 71f1ace

File tree

25 files changed

+73
-2
lines changed

25 files changed

+73
-2
lines changed

assets/icons/icons/faCodeberg.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// https://github.com/simple-icons/simple-icons/blob/develop/LICENSE.md
2+
export default {
3+
prefix: "fab",
4+
iconName: "codeberg",
5+
icon: [
6+
24,
7+
24,
8+
[],
9+
"e005",
10+
"M11.955.49A12 12 0 0 0 0 12.49a12 12 0 0 0 1.832 6.373L11.838 5.928a.187.14 0 0 1 .324 0l10.006 12.935A12 12 0 0 0 24 12.49a12 12 0 0 0-12-12 12 12 0 0 0-.045 0zm.375 6.467l4.416 16.553a12 12 0 0 0 5.137-4.213z",
11+
],
12+
};

assets/icons/icons/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import faBilibili from "./faBilibili";
2+
import faCodeberg from "./faCodeberg";
23
import faLiberapay from "./faLiberapay";
34
import faOffline from "./faOffline";
45
import faTipeee from "./faTipeee";
5-
import faXTwitter from "./faXTwitter"
6+
import faXTwitter from "./faXTwitter";
67

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

assets/icons/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ import {
102102
} from "@fortawesome/free-solid-svg-icons";
103103
import { default as customIcons } from "./custom";
104104
import { faBilibili, faLiberapay, faOffline, faTipeee, faXTwitter } from "./icons";
105+
import faCodeberg from "./icons/faCodeberg";
105106

106107
let icons = [
107108
// Solid Icons
@@ -209,6 +210,7 @@ let icons = [
209210

210211
// Custom Icons
211212
faBilibili,
213+
faCodeberg,
212214
faLiberapay,
213215
faOffline,
214216
faTipeee,

exampleSite/config/_default/params.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ reduceFontSize = true
305305

306306
# Set socialColor as false to disable the color.
307307
[social]
308+
#codeberg = "yourcodebergusername"
308309
email = "user@domain.tld"
309310
# facebook = "yourfacebookusername"
310311
github = "razonyang/hugo-theme-bootstrap"

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,4 @@ github = "githubusername"
100100
| `tipeee` | Tipeee Username |
101101
| `rss` | Empty string for disabling the RSS link |
102102
| `website` | Website URL |
103+
| `codeberg` | Codeberg 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
@@ -100,3 +100,4 @@ github = "githubusername"
100100
| `tipeee` | Tipeee 用户名 |
101101
| `rss` | 空字符串以禁用 RSS 链接 |
102102
| `website` | 网站 URL |
103+
| `codeberg` | Codeberg 用户名 |

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,4 @@ github = "githubusername"
100100
| `tipeee` | Tipeee 使用者名稱 |
101101
| `rss` | 空字符串以禁用 RSS 鏈接 |
102102
| `website` | 網站 URL |
103+
| `codeberg` | Codeberg 使用者名稱 |

i18n/ar.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,9 @@ other = "Bilibili"
311311
[social_bitbucket]
312312
other = "Bitbucket"
313313

314+
[social_codeberg]
315+
other = "Codeberg"
316+
314317
[social_discord]
315318
other = "ديسكورد"
316319

i18n/de.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,9 @@ other = "Bilibili"
311311
[social_bitbucket]
312312
other = "Bitbucket"
313313

314+
[social_codeberg]
315+
other = "Codeberg"
316+
314317
[social_discord]
315318
other = "Discord"
316319

i18n/en.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,9 @@ other = "Bilibili"
311311
[social_bitbucket]
312312
other = "Bitbucket"
313313

314+
[social_codeberg]
315+
other = "Codeberg"
316+
314317
[social_discord]
315318
other = "Discord"
316319

i18n/es.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,9 @@ other = "Bilibili"
311311
[social_bitbucket]
312312
other = "Bitbucket"
313313

314+
[social_codeberg]
315+
other = "Codeberg"
316+
314317
[social_discord]
315318
other = "Discord"
316319

i18n/fr.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ other = "Séries"
124124
[settings]
125125
other = "Réglages"
126126

127+
[social_codeberg]
128+
other = "Codeberg"
129+
127130
[table_of_contents]
128131
other = "Sommaire"
129132

i18n/id.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,9 @@ other = "Seri"
200200
[settings]
201201
other = "Pengaturan"
202202

203+
[social_codeberg]
204+
other = "Codeberg"
205+
203206
[table_of_contents]
204207
other = "Konten"
205208

i18n/ja.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,9 @@ other = "シリーズ"
236236
[settings]
237237
other = "設定"
238238

239+
[social_codeberg]
240+
other = "Codeberg"
241+
239242
[table_of_contents]
240243
other = "目次"
241244

i18n/pl.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,9 @@ other = "Bilibili"
311311
[social_bitbucket]
312312
other = "Bitbucket"
313313

314+
[social_codeberg]
315+
other = "Codeberg"
316+
314317
[social_discord]
315318
other = "Discord"
316319

i18n/pt.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,9 @@ other = "Séries"
189189
[settings]
190190
other = "Configurações"
191191

192+
[social_codeberg]
193+
other = "Codeberg"
194+
192195
[table_of_contents]
193196
other = "Índice"
194197

i18n/ru.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,9 @@ other = "Bilibili"
311311
[social_bitbucket]
312312
other = "Bitbucket"
313313

314+
[social_codeberg]
315+
other = "Codeberg"
316+
314317
[social_discord]
315318
other = "Discord"
316319

i18n/uk.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,9 @@ other = "Bilibili"
311311
[social_bitbucket]
312312
other = "Bitbucket"
313313

314+
[social_codeberg]
315+
other = "Codeberg"
316+
314317
[social_discord]
315318
other = "Discord"
316319

i18n/uz.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ other = "Ruknlar"
124124
[settings]
125125
other = "Sozlamalar"
126126

127+
[social_codeberg]
128+
other = "Codeberg"
129+
127130
[table_of_contents]
128131
other = "Mundarija"
129132

i18n/zh-cn.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,9 @@ other = "哔哩哔哩"
298298
[social_bitbucket]
299299
other = "Bitbucket"
300300

301+
[social_codeberg]
302+
other = "Codeberg"
303+
301304
[social_discord]
302305
other = "Discord"
303306

i18n/zh-hans.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,9 @@ other = "哔哩哔哩"
298298
[social_bitbucket]
299299
other = "Bitbucket"
300300

301+
[social_codeberg]
302+
other = "Codeberg"
303+
301304
[social_discord]
302305
other = "Discord"
303306

i18n/zh-hant.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,9 @@ other = "嗶哩嗶哩"
298298
[social_bitbucket]
299299
other = "Bitbucket"
300300

301+
[social_codeberg]
302+
other = "Codeberg"
303+
301304
[social_discord]
302305
other = "Discord"
303306

i18n/zh-hk.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,9 @@ other = "嗶哩嗶哩"
298298
[social_bitbucket]
299299
other = "Bitbucket"
300300

301+
[social_codeberg]
302+
other = "Codeberg"
303+
301304
[social_discord]
302305
other = "Discord"
303306

i18n/zh-tw.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,9 @@ other = "嗶哩嗶哩"
298298
[social_bitbucket]
299299
other = "Bitbucket"
300300

301+
[social_codeberg]
302+
other = "Codeberg"
303+
301304
[social_discord]
302305
other = "Discord"
303306

layouts/partials/helpers/social-links.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"artstation" (dict "url" "https://www.artstation.com/%s" "icon" "fab fa-artstation" "color" "#0a5878")
55
"bilibili" (dict "url" "https://space.bilibili.com/%s" "icon" "fab fa-bilibili" "color" "#fb7299")
66
"bitbucket" (dict "url" "https://bitbucket.org/%s" "color" "#0e65df")
7+
"codeberg" (dict "url" "https://codeberg.org/%s" "icon" "fab fa-codeberg")
78
"discord" (dict "url" "https://discord.com/invite/%s" "icon" "fab fa-discord")
89
"discourse" (dict "url" "%s" "icon" "fab fa-discourse")
910
"dockerhub" (dict "url" "https://hub.docker.com/u/%s" "icon" "fab fa-docker")

0 commit comments

Comments
 (0)