@docusaurus/plugin-content-blog 3.6.3-canary-6182 → 3.6.3-canary-6184
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/authorsSocials.js +12 -0
- package/package.json +10 -10
- package/src/authorsSocials.ts +12 -0
- package/src/plugin-content-blog.d.ts +7 -1
package/lib/authorsSocials.js
CHANGED
|
@@ -17,6 +17,12 @@ exports.AuthorSocialsSchema = utils_validation_1.Joi.object({
|
|
|
17
17
|
.try(utils_validation_1.Joi.number(), utils_validation_1.Joi.string())
|
|
18
18
|
.custom((val) => String(val)),
|
|
19
19
|
x: utils_validation_1.Joi.string(),
|
|
20
|
+
bluesky: utils_validation_1.Joi.string(),
|
|
21
|
+
instagram: utils_validation_1.Joi.string(),
|
|
22
|
+
threads: utils_validation_1.Joi.string(),
|
|
23
|
+
mastodon: utils_validation_1.Joi.string(),
|
|
24
|
+
twitch: utils_validation_1.Joi.string(),
|
|
25
|
+
youtube: utils_validation_1.Joi.string(),
|
|
20
26
|
}).unknown();
|
|
21
27
|
const PredefinedPlatformNormalizers = {
|
|
22
28
|
x: (handle) => `https://x.com/${handle}`,
|
|
@@ -24,6 +30,12 @@ const PredefinedPlatformNormalizers = {
|
|
|
24
30
|
github: (handle) => `https://github.com/${handle}`,
|
|
25
31
|
linkedin: (handle) => `https://www.linkedin.com/in/${handle}/`,
|
|
26
32
|
stackoverflow: (userId) => `https://stackoverflow.com/users/${userId}`,
|
|
33
|
+
bluesky: (handle) => `https://bsky.app/profile/${handle}`,
|
|
34
|
+
instagram: (handle) => `https://www.instagram.com/${handle}`,
|
|
35
|
+
threads: (handle) => `https://www.threads.net/@${handle}`,
|
|
36
|
+
mastodon: (handle) => `https://mastodon.social/@${handle}`, // can be in format user@other.server and it will redirect if needed
|
|
37
|
+
twitch: (handle) => `https://twitch.tv/${handle}`,
|
|
38
|
+
youtube: (handle) => `https://youtube.com/@${handle}`, // https://support.google.com/youtube/answer/6180214?hl=en
|
|
27
39
|
};
|
|
28
40
|
function normalizeSocialEntry([platform, value]) {
|
|
29
41
|
const normalizer = PredefinedPlatformNormalizers[platform.toLowerCase()];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/plugin-content-blog",
|
|
3
|
-
"version": "3.6.3-canary-
|
|
3
|
+
"version": "3.6.3-canary-6184",
|
|
4
4
|
"description": "Blog plugin for Docusaurus.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/plugin-content-blog.d.ts",
|
|
@@ -31,14 +31,14 @@
|
|
|
31
31
|
},
|
|
32
32
|
"license": "MIT",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@docusaurus/core": "3.6.3-canary-
|
|
35
|
-
"@docusaurus/logger": "3.6.3-canary-
|
|
36
|
-
"@docusaurus/mdx-loader": "3.6.3-canary-
|
|
37
|
-
"@docusaurus/theme-common": "3.6.3-canary-
|
|
38
|
-
"@docusaurus/types": "3.6.3-canary-
|
|
39
|
-
"@docusaurus/utils": "3.6.3-canary-
|
|
40
|
-
"@docusaurus/utils-common": "3.6.3-canary-
|
|
41
|
-
"@docusaurus/utils-validation": "3.6.3-canary-
|
|
34
|
+
"@docusaurus/core": "3.6.3-canary-6184",
|
|
35
|
+
"@docusaurus/logger": "3.6.3-canary-6184",
|
|
36
|
+
"@docusaurus/mdx-loader": "3.6.3-canary-6184",
|
|
37
|
+
"@docusaurus/theme-common": "3.6.3-canary-6184",
|
|
38
|
+
"@docusaurus/types": "3.6.3-canary-6184",
|
|
39
|
+
"@docusaurus/utils": "3.6.3-canary-6184",
|
|
40
|
+
"@docusaurus/utils-common": "3.6.3-canary-6184",
|
|
41
|
+
"@docusaurus/utils-validation": "3.6.3-canary-6184",
|
|
42
42
|
"cheerio": "1.0.0-rc.12",
|
|
43
43
|
"feed": "^4.2.2",
|
|
44
44
|
"fs-extra": "^11.1.1",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"@total-typescript/shoehorn": "^0.1.2",
|
|
63
63
|
"tree-node-cli": "^1.6.0"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "b24218826528e40fc6575088b5e8ff341f827eec"
|
|
66
66
|
}
|
package/src/authorsSocials.ts
CHANGED
|
@@ -21,6 +21,12 @@ export const AuthorSocialsSchema = Joi.object<AuthorSocials>({
|
|
|
21
21
|
.try(Joi.number(), Joi.string())
|
|
22
22
|
.custom((val) => String(val)),
|
|
23
23
|
x: Joi.string(),
|
|
24
|
+
bluesky: Joi.string(),
|
|
25
|
+
instagram: Joi.string(),
|
|
26
|
+
threads: Joi.string(),
|
|
27
|
+
mastodon: Joi.string(),
|
|
28
|
+
twitch: Joi.string(),
|
|
29
|
+
youtube: Joi.string(),
|
|
24
30
|
}).unknown();
|
|
25
31
|
|
|
26
32
|
type PredefinedPlatformNormalizer = (value: string) => string;
|
|
@@ -35,6 +41,12 @@ const PredefinedPlatformNormalizers: Record<
|
|
|
35
41
|
linkedin: (handle: string) => `https://www.linkedin.com/in/${handle}/`,
|
|
36
42
|
stackoverflow: (userId: string) =>
|
|
37
43
|
`https://stackoverflow.com/users/${userId}`,
|
|
44
|
+
bluesky: (handle: string) => `https://bsky.app/profile/${handle}`,
|
|
45
|
+
instagram: (handle: string) => `https://www.instagram.com/${handle}`,
|
|
46
|
+
threads: (handle: string) => `https://www.threads.net/@${handle}`,
|
|
47
|
+
mastodon: (handle: string) => `https://mastodon.social/@${handle}`, // can be in format user@other.server and it will redirect if needed
|
|
48
|
+
twitch: (handle: string) => `https://twitch.tv/${handle}`,
|
|
49
|
+
youtube: (handle: string) => `https://youtube.com/@${handle}`, // https://support.google.com/youtube/answer/6180214?hl=en
|
|
38
50
|
};
|
|
39
51
|
|
|
40
52
|
type SocialEntry = [string, string];
|
|
@@ -46,7 +46,13 @@ declare module '@docusaurus/plugin-content-blog' {
|
|
|
46
46
|
| 'github'
|
|
47
47
|
| 'linkedin'
|
|
48
48
|
| 'stackoverflow'
|
|
49
|
-
| 'x'
|
|
49
|
+
| 'x'
|
|
50
|
+
| 'bluesky'
|
|
51
|
+
| 'instagram'
|
|
52
|
+
| 'threads'
|
|
53
|
+
| 'mastodon'
|
|
54
|
+
| 'youtube'
|
|
55
|
+
| 'twitch';
|
|
50
56
|
|
|
51
57
|
/**
|
|
52
58
|
* Social platforms of the author.
|