jeawin-astro 4.0.7 → 4.0.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jeawin-astro",
3
- "version": "4.0.7",
3
+ "version": "4.0.9",
4
4
  "author": "chaegumi <chaegumi@qq.com>",
5
5
  "description": "Astro components for Jeawin CMS",
6
6
  "license": "MIT",
@@ -58,13 +58,10 @@
58
58
  "publishConfig": {
59
59
  "access": "public"
60
60
  },
61
- "peerDependencies": {
62
- "astro": ">=5.0.0"
63
- },
64
61
  "dependencies": {
65
62
  "@astrojs/alpinejs": "^0.5.0",
66
63
  "@astrojs/check": "^0.9.7",
67
- "@astrojs/cloudflare": "^13.0.2",
64
+ "@astrojs/cloudflare": "^13.1.1",
68
65
  "@astrojs/rss": "^4.0.17",
69
66
  "@astrojs/sitemap": "3.7.1",
70
67
  "@astrojs/ts-plugin": "^1.10.7",
@@ -87,7 +84,7 @@
87
84
  "astro-integration-kit": "^0.18.0",
88
85
  "cacache": "^19.0.1",
89
86
  "cheerio": "^1.2.0",
90
- "dayjs": "^1.11.19",
87
+ "dayjs": "^1.11.20",
91
88
  "fetch-jsonp": "^1.4.0",
92
89
  "glob": "^11.1.0",
93
90
  "keyv": "^5.6.0",
@@ -106,7 +103,7 @@
106
103
  "zod": "^3.25.76"
107
104
  },
108
105
  "devDependencies": {
109
- "@astrojs/node": "^10.0.0",
106
+ "@astrojs/node": "^10.0.1",
110
107
  "@babel/core": "^7.29.0",
111
108
  "@babel/preset-env": "^7.29.0",
112
109
  "@rollup/plugin-babel": "^6.1.0",
@@ -119,7 +116,7 @@
119
116
  "@rollup/plugin-typescript": "^12.3.0",
120
117
  "@types/lodash": "^4.17.24",
121
118
  "@types/sprintf-js": "^1.1.4",
122
- "astro": "^6.0.2",
119
+ "astro": "^6.0.4",
123
120
  "autoprefixer": "^10.4.27",
124
121
  "chai": "^5.3.3",
125
122
  "mocha": "^10.8.2",
@@ -8,131 +8,158 @@
8
8
  * @email chaegumi@jeawin.com
9
9
  * @filesource
10
10
  */
11
- import { Icon } from "astro-icon/components";
12
- import SiteOptions from "./site_options.astro";
11
+ import {render_value} from "../scripts/util.js";
12
+
13
+ const { site_options } = Astro.locals;
14
+
13
15
  const social_medias = [
14
16
  {
15
17
  title: "Twitter",
16
18
  name: "twitter",
17
- icon: "fa6-brands:x-twitter",
19
+ icon: `<svg xmlns="http://www.w3.org/2000/svg" width="1.2em" height="1.2em" viewBox="0 0 512 512"><path fill="currentColor" d="M389.2 48h70.6L305.6 224.2L487 464H345L233.7 318.6L106.5 464H35.8l164.9-188.5L26.8 48h145.6l100.5 132.9zm-24.8 373.8h39.1L151.1 88h-42z"/></svg>`,
18
20
  is_link: true,
21
+ link: render_value(site_options, 'twitter')
19
22
  },
20
23
  {
21
24
  title: "Facebook",
22
25
  name: "facebook",
23
- icon: "fa6-brands:facebook",
26
+ icon: `<svg xmlns="http://www.w3.org/2000/svg" width="1.2em" height="1.2em" viewBox="0 0 512 512"><path fill="currentColor" d="M512 256C512 114.6 397.4 0 256 0S0 114.6 0 256c0 120 82.7 220.8 194.2 248.5V334.2h-52.8V256h52.8v-33.7c0-87.1 39.4-127.5 125-127.5c16.2 0 44.2 3.2 55.7 6.4V172c-6-.6-16.5-1-29.6-1c-42 0-58.2 15.9-58.2 57.2V256h83.6l-14.4 78.2H287v175.9C413.8 494.8 512 386.9 512 256"/></svg>`,
24
27
  is_link: true,
28
+ link: render_value(site_options, 'facebook')
25
29
  },
26
30
  {
27
31
  title: "Youtube",
28
32
  name: "youtube",
29
- icon: "fa6-brands:youtube",
33
+ icon: `<svg xmlns="http://www.w3.org/2000/svg" width="1.35em" height="1.2em" viewBox="0 0 576 512"><path fill="currentColor" d="M549.655 124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781 64 288 64 288 64S117.22 64 74.629 75.486c-23.497 6.322-42.003 24.947-48.284 48.597c-11.412 42.867-11.412 132.305-11.412 132.305s0 89.438 11.412 132.305c6.281 23.65 24.787 41.5 48.284 47.821C117.22 448 288 448 288 448s170.78 0 213.371-11.486c23.497-6.321 42.003-24.171 48.284-47.821c11.412-42.867 11.412-132.305 11.412-132.305s0-89.438-11.412-132.305m-317.51 213.508V175.185l142.739 81.205z"/></svg>`,
30
34
  is_link: true,
35
+ link: render_value(site_options, 'youtube')
31
36
  },
32
37
  {
33
38
  title: "Tiktok",
34
39
  name: "tiktok",
35
- icon: "fa6-brands:tiktok",
40
+ icon: `<svg xmlns="http://www.w3.org/2000/svg" width="1.05em" height="1.2em" viewBox="0 0 448 512"><path fill="currentColor" d="M448 209.91a210.06 210.06 0 0 1-122.77-39.25v178.72A162.55 162.55 0 1 1 185 188.31v89.89a74.62 74.62 0 1 0 52.23 71.18V0h88a121 121 0 0 0 1.86 22.17A122.18 122.18 0 0 0 381 102.39a121.43 121.43 0 0 0 67 20.14Z"/></svg>`,
36
41
  is_link: true,
42
+ link: render_value(site_options, 'tiktok')
37
43
  },
38
44
  {
39
45
  title: "Linkedin",
40
46
  name: "linkedin",
41
- icon: "fa6-brands:linkedin",
47
+ icon: `<svg xmlns="http://www.w3.org/2000/svg" width="1.05em" height="1.2em" viewBox="0 0 448 512"><path fill="currentColor" d="M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3M135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5c0 21.3-17.2 38.5-38.5 38.5m282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7c-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5c67.2 0 79.7 44.3 79.7 101.9z"/></svg>`,
42
48
  is_link: true,
49
+ link: render_value(site_options, 'linkedin')
43
50
  },
44
51
  {
45
52
  title: "Google Plus",
46
53
  name: "googleplus",
47
- icon: "fa6-brands:google-plus",
54
+ icon: `<svg xmlns="http://www.w3.org/2000/svg" width="1.2em" height="1.2em" viewBox="0 0 512 512"><path fill="currentColor" d="M256 8C119.1 8 8 119.1 8 256s111.1 248 248 248s248-111.1 248-248S392.9 8 256 8m-70.7 372a124 124 0 0 1 0-248c31.3 0 60.1 11 83 32.3l-33.6 32.6c-13.2-12.9-31.3-19.1-49.4-19.1c-42.9 0-77.2 35.5-77.2 78.1s34.2 78.1 77.2 78.1c32.6 0 64.9-19.1 70.1-53.3h-70.1v-42.6h116.9a109 109 0 0 1 1.9 20.7c0 70.8-47.5 121.2-118.8 121.2m230.2-106.2v35.5H380v-35.5h-35.5v-35.5H380v-35.5h35.5v35.5h35.2v35.5Z"/></svg>`,
48
55
  is_link: true,
56
+ link: render_value(site_options, 'googleplus')
49
57
  },
50
58
  {
51
59
  title: "Flickr",
52
60
  name: "flickr",
53
- icon: "fa6-brands:flickr",
61
+ icon: `<svg xmlns="http://www.w3.org/2000/svg" width="1.05em" height="1.2em" viewBox="0 0 448 512"><path fill="currentColor" d="M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48M144.5 319c-35.1 0-63.5-28.4-63.5-63.5s28.4-63.5 63.5-63.5s63.5 28.4 63.5 63.5s-28.4 63.5-63.5 63.5m159 0c-35.1 0-63.5-28.4-63.5-63.5s28.4-63.5 63.5-63.5s63.5 28.4 63.5 63.5s-28.4 63.5-63.5 63.5"/></svg>`,
54
62
  is_link: true,
63
+ link: render_value(site_options, 'flickr')
55
64
  },
56
65
  {
57
66
  title: "Pinterest",
58
67
  name: "pinterest",
59
- icon: "fa6-brands:pinterest",
68
+ icon: `<svg xmlns="http://www.w3.org/2000/svg" width="1.17em" height="1.2em" viewBox="0 0 496 512"><path fill="currentColor" d="M496 256c0 137-111 248-248 248c-25.6 0-50.2-3.9-73.4-11.1c10.1-16.5 25.2-43.5 30.8-65c3-11.6 15.4-59 15.4-59c8.1 15.4 31.7 28.5 56.8 28.5c74.8 0 128.7-68.8 128.7-154.3c0-81.9-66.9-143.2-152.9-143.2c-107 0-163.9 71.8-163.9 150.1c0 36.4 19.4 81.7 50.3 96.1c4.7 2.2 7.2 1.2 8.3-3.3c.8-3.4 5-20.3 6.9-28.1c.6-2.5.3-4.7-1.7-7.1c-10.1-12.5-18.3-35.3-18.3-56.6c0-54.7 41.4-107.6 112-107.6c60.9 0 103.6 41.5 103.6 100.9c0 67.1-33.9 113.6-78 113.6c-24.3 0-42.6-20.1-36.7-44.8c7-29.5 20.5-61.3 20.5-82.6c0-19-10.2-34.9-31.4-34.9c-24.9 0-44.9 25.7-44.9 60.2c0 22 7.4 36.8 7.4 36.8s-24.5 103.8-29 123.2c-5 21.4-3 51.6-.9 71.2C65.4 450.9 0 361.1 0 256C0 119 111 8 248 8s248 111 248 248"/></svg>`,
60
69
  is_link: true,
70
+ link: render_value(site_options, 'pinterest')
61
71
  },
62
72
  {
63
73
  title: "Whatsapp",
64
74
  name: "whatsapp",
65
- icon: "fa6-brands:whatsapp",
75
+ icon: `<svg xmlns="http://www.w3.org/2000/svg" width="1.05em" height="1.2em" viewBox="0 0 448 512"><path fill="currentColor" d="M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222c0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222c0-59.3-25.2-115-67.1-157m-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4l-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2c0-101.7 82.8-184.5 184.6-184.5c49.3 0 95.6 19.2 130.4 54.1s56.2 81.2 56.1 130.5c0 101.8-84.9 184.6-186.6 184.6m101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18c-5.1-1.9-8.8-2.8-12.5 2.8s-14.3 18-17.6 21.8c-3.2 3.7-6.5 4.2-12 1.4c-32.6-16.3-54-29.1-75.5-66c-5.7-9.8 5.7-9.1 16.3-30.3c1.8-3.7.9-6.9-.5-9.7s-12.5-30.1-17.1-41.2c-4.5-10.8-9.1-9.3-12.5-9.5c-3.2-.2-6.9-.2-10.6-.2s-9.7 1.4-14.8 6.9c-5.1 5.6-19.4 19-19.4 46.3s19.9 53.7 22.6 57.4c2.8 3.7 39.1 59.7 94.8 83.8c35.2 15.2 49 16.5 66.6 13.9c10.7-1.6 32.8-13.4 37.4-26.4s4.6-24.1 3.2-26.4c-1.3-2.5-5-3.9-10.5-6.6"/></svg>`,
66
76
  is_link: true,
77
+ link: render_value(site_options, 'whatsapp')
67
78
  },
68
79
  {
69
80
  title: "Instagram",
70
81
  name: "instagram",
71
- icon: "fa6-brands:instagram",
82
+ icon: `<svg xmlns="http://www.w3.org/2000/svg" width="1.05em" height="1.2em" viewBox="0 0 448 512"><path fill="currentColor" d="M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9S287.7 141 224.1 141m0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7s74.7 33.5 74.7 74.7s-33.6 74.7-74.7 74.7m146.4-194.3c0 14.9-12 26.8-26.8 26.8c-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8s26.8 12 26.8 26.8m76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9c-26.2-26.2-58-34.4-93.9-36.2c-37-2.1-147.9-2.1-184.9 0c-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9c1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0c35.9-1.7 67.7-9.9 93.9-36.2c26.2-26.2 34.4-58 36.2-93.9c2.1-37 2.1-147.8 0-184.8M398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6c-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6c-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6c29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6c11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1"/></svg>`,
72
83
  is_link: true,
84
+ link: render_value(site_options, 'instagram')
73
85
  },
74
86
  {
75
87
  title: "QQ",
76
88
  name: "qq",
77
- icon: "fa6-brands:qq",
89
+ icon: `<svg xmlns="http://www.w3.org/2000/svg" width="1.05em" height="1.2em" viewBox="0 0 448 512"><path fill="currentColor" d="M433.754 420.445c-11.526 1.393-44.86-52.741-44.86-52.741c0 31.345-16.136 72.247-51.051 101.786c16.842 5.192 54.843 19.167 45.803 34.421c-7.316 12.343-125.51 7.881-159.632 4.037c-34.122 3.844-152.316 8.306-159.632-4.037c-9.045-15.25 28.918-29.214 45.783-34.415c-34.92-29.539-51.059-70.445-51.059-101.792c0 0-33.334 54.134-44.859 52.741c-5.37-.65-12.424-29.644 9.347-99.704c10.261-33.024 21.995-60.478 40.144-105.779C60.683 98.063 108.982.006 224 0c113.737.006 163.156 96.133 160.264 214.963c18.118 45.223 29.912 72.85 40.144 105.778c21.768 70.06 14.716 99.053 9.346 99.704"/></svg>`,
78
90
  is_link: false,
91
+ link: render_value(site_options, 'qq')
79
92
  },
80
93
  {
81
94
  title: "Wechat",
82
95
  name: "wechat",
83
- icon: "fa6-brands:weixin",
96
+ icon: `<svg xmlns="http://www.w3.org/2000/svg" width="1.35em" height="1.2em" viewBox="0 0 576 512"><path fill="currentColor" d="M385.2 167.6c6.4 0 12.6.3 18.8 1.1C387.4 90.3 303.3 32 207.7 32C100.5 32 13 104.8 13 197.4c0 53.4 29.3 97.5 77.9 131.6l-19.3 58.6l68-34.1c24.4 4.8 43.8 9.7 68.2 9.7c6.2 0 12.1-.3 18.3-.8c-4-12.9-6.2-26.6-6.2-40.8c-.1-84.9 72.9-154 165.3-154m-104.5-52.9c14.5 0 24.2 9.7 24.2 24.4c0 14.5-9.7 24.2-24.2 24.2c-14.8 0-29.3-9.7-29.3-24.2c.1-14.7 14.6-24.4 29.3-24.4m-136.4 48.6c-14.5 0-29.3-9.7-29.3-24.2c0-14.8 14.8-24.4 29.3-24.4c14.8 0 24.4 9.7 24.4 24.4c0 14.6-9.6 24.2-24.4 24.2M563 319.4c0-77.9-77.9-141.3-165.4-141.3c-92.7 0-165.4 63.4-165.4 141.3S305 460.7 397.6 460.7c19.3 0 38.9-5.1 58.6-9.9l53.4 29.3l-14.8-48.6C534 402.1 563 363.2 563 319.4m-219.1-24.5c-9.7 0-19.3-9.7-19.3-19.6c0-9.7 9.7-19.3 19.3-19.3c14.8 0 24.4 9.7 24.4 19.3c0 10-9.7 19.6-24.4 19.6m107.1 0c-9.7 0-19.3-9.7-19.3-19.6c0-9.7 9.7-19.3 19.3-19.3c14.5 0 24.4 9.7 24.4 19.3c.1 10-9.9 19.6-24.4 19.6"/></svg>`,
84
97
  is_link: false,
98
+ link: render_value(site_options, 'wechat')
85
99
  },
86
100
  {
87
101
  title: "Weibo",
88
102
  name: "weibo",
89
- icon: "fa6-brands:weibo",
103
+ icon: `<svg xmlns="http://www.w3.org/2000/svg" width="1.2em" height="1.2em" viewBox="0 0 512 512"><path fill="currentColor" d="M407 177.6c7.6-24-13.4-46.8-37.4-41.7c-22 4.8-28.8-28.1-7.1-32.8c50.1-10.9 92.3 37.1 76.5 84.8c-6.8 21.2-38.8 10.8-32-10.3M214.8 446.7C108.5 446.7 0 395.3 0 310.4c0-44.3 28-95.4 76.3-143.7C176 67 279.5 65.8 249.9 161c-4 13.1 12.3 5.7 12.3 6c79.5-33.6 140.5-16.8 114 51.4c-3.7 9.4 1.1 10.9 8.3 13.1c135.7 42.3 34.8 215.2-169.7 215.2m143.7-146.3c-5.4-55.7-78.5-94-163.4-85.7c-84.8 8.6-148.8 60.3-143.4 116s78.5 94 163.4 85.7c84.8-8.6 148.8-60.3 143.4-116M347.9 35.1c-25.9 5.6-16.8 43.7 8.3 38.3c72.3-15.2 134.8 52.8 111.7 124c-7.4 24.2 29.1 37 37.4 12c31.9-99.8-55.1-195.9-157.4-174.3m-78.5 311c-17.1 38.8-66.8 60-109.1 46.3c-40.8-13.1-58-53.4-40.3-89.7c17.7-35.4 63.1-55.4 103.4-45.1c42 10.8 63.1 50.2 46 88.5m-86.3-30c-12.9-5.4-30 .3-38 12.9c-8.3 12.9-4.3 28 8.6 34c13.1 6 30.8.3 39.1-12.9c8-13.1 3.7-28.3-9.7-34m32.6-13.4c-5.1-1.7-11.4.6-14.3 5.4c-2.9 5.1-1.4 10.6 3.7 12.9c5.1 2 11.7-.3 14.6-5.4c2.8-5.2 1.1-10.9-4-12.9"/></svg>`,
90
104
  is_link: true,
105
+ link: render_value(site_options, 'weibo')
91
106
  },
92
107
  {
93
108
  title: "Bilibili",
94
109
  name: "bilibili",
95
- icon: "fa6-brands:bilibili",
110
+ icon: `<svg xmlns="http://www.w3.org/2000/svg" width="1.2em" height="1.2em" viewBox="0 0 512 512"><path fill="currentColor" d="M488.6 104.1c16.7 18.1 24.4 39.7 23.3 65.7v202.4c-.4 26.4-9.2 48.1-26.5 65.1c-17.2 17-39.1 25.9-65.5 26.7H92.02c-26.45-.8-48.21-9.8-65.28-27.2C9.682 419.4.767 396.5 0 368.2V169.8c.767-26 9.682-47.6 26.74-65.7C43.81 87.75 65.57 78.77 92.02 78h29.38L96.05 52.19c-5.75-5.73-8.63-13-8.63-21.79c0-8.8 2.88-16.06 8.63-21.797C101.8 2.868 109.1 0 117.9 0q13.2 0 21.9 8.603L213.1 78h88l74.5-69.397C381.7 2.868 389.2 0 398 0q13.2 0 21.9 8.603c5.7 5.737 8.6 12.997 8.6 21.797c0 8.79-2.9 16.06-8.6 21.79L394.6 78h29.3c26.4.77 48 9.75 64.7 26.1m-38.8 69.7c-.4-9.6-3.7-17.4-10.7-23.5c-5.2-6.1-14-9.4-22.7-9.8H96.05c-9.59.4-17.45 3.7-23.58 9.8c-6.14 6.1-9.4 13.9-9.78 23.5v194.4c0 9.2 3.26 17 9.78 23.5s14.38 9.8 23.58 9.8H416.4c9.2 0 17-3.3 23.3-9.8s9.7-14.3 10.1-23.5zm-264.3 42.7c6.3 6.3 9.7 14.1 10.1 23.2V273c-.4 9.2-3.7 16.9-9.8 23.2c-6.2 6.3-14 9.5-23.6 9.5s-17.5-3.2-23.6-9.5s-9.4-14-9.8-23.2v-33.3c.4-9.1 3.8-16.9 10.1-23.2s13.2-9.6 23.3-10c9.2.4 17 3.7 23.3 10m191.5 0c6.3 6.3 9.7 14.1 10.1 23.2V273c-.4 9.2-3.7 16.9-9.8 23.2s-14 9.5-23.6 9.5s-17.4-3.2-23.6-9.5c-7-6.3-9.4-14-9.7-23.2v-33.3c.3-9.1 3.7-16.9 10-23.2s14.1-9.6 23.3-10c9.2.4 17 3.7 23.3 10"/></svg>`,
96
111
  is_link: true,
112
+ link: render_value(site_options, 'bilibili')
97
113
  },
98
114
  {
99
115
  title: "Zhihu",
100
116
  name: "zhihu",
101
- icon: "fa6-brands:zhihu",
117
+ icon: `<svg xmlns="http://www.w3.org/2000/svg" width="1.5em" height="1.2em" viewBox="0 0 640 512"><path fill="currentColor" d="M170.54 148.13v217.54l23.43.01l7.71 26.37l42.01-26.37h49.53V148.13zm97.75 193.93h-27.94l-27.9 17.51l-5.08-17.47l-11.9-.04V171.75h72.82zm-118.46-94.39H97.5c1.74-27.1 2.2-51.59 2.2-73.46h51.16s1.97-22.56-8.58-22.31h-88.5c3.49-13.12 7.87-26.66 13.12-40.67c0 0-24.07 0-32.27 21.57c-3.39 8.9-13.21 43.14-30.7 78.12c5.89-.64 25.37-1.18 36.84-22.21c2.11-5.89 2.51-6.66 5.14-14.53h28.87c0 10.5-1.2 66.88-1.68 73.44H20.83c-11.74 0-15.56 23.62-15.56 23.62h65.58C66.45 321.1 42.83 363.12 0 396.34c20.49 5.85 40.91-.93 51-9.9c0 0 22.98-20.9 35.59-69.25l53.96 64.94s7.91-26.89-1.24-39.99c-7.58-8.92-28.06-33.06-36.79-41.81L87.9 311.95c4.36-13.98 6.99-27.55 7.87-40.67h61.65s-.09-23.62-7.59-23.62zm412.02-1.6c20.83-25.64 44.98-58.57 44.98-58.57s-18.65-14.8-27.38-4.06c-6 8.15-36.83 48.2-36.83 48.2zm-150.09-59.09c-9.01-8.25-25.91 2.13-25.91 2.13s39.52 55.04 41.12 57.45l19.46-13.73s-25.67-37.61-34.66-45.86h-.01zM640 258.35c-19.78 0-130.91.93-131.06.93v-101c4.81 0 12.42-.4 22.85-1.2c40.88-2.41 70.13-4 87.77-4.81c0 0 12.22-27.19-.59-33.44c-3.07-1.18-23.17 4.58-23.17 4.58s-165.22 16.49-232.36 18.05c1.6 8.82 7.62 17.08 15.78 19.55c13.31 3.48 22.69 1.7 49.15.89c24.83-1.6 43.68-2.43 56.51-2.43v99.81H351.41s2.82 22.31 25.51 22.85h107.94v70.92c0 13.97-11.19 21.99-24.48 21.12c-14.08.11-26.08-1.15-41.69-1.81c1.99 3.97 6.33 14.39 19.31 21.84c9.88 4.81 16.17 6.57 26.02 6.57c29.56 0 45.67-17.28 44.89-45.31v-73.32h122.36c9.68 0 8.7-23.78 8.7-23.78z"/></svg>`,
102
118
  is_link: true,
119
+ link: render_value(site_options, 'zhihu')
103
120
  },
104
121
  ];
105
122
 
123
+ let final_social_medias: any[] = [];
124
+
125
+ for(const obj of social_medias){
126
+ if(render_value(site_options, obj.name)){
127
+ obj.link = render_value(site_options, obj.name);
128
+ final_social_medias.push(obj);
129
+ }
130
+ }
131
+
106
132
  const { icon_color } = Astro.props;
107
- ---
108
133
 
134
+ let html = '';
135
+ if (Astro.slots.has('default')) {
136
+ html = await Astro.slots.render('default', [final_social_medias]);
137
+ }
138
+ ---
109
139
  {
110
- social_medias.map((media) => (
111
- <SiteOptions option_name={media.name}>
112
- {(option_value: any) => (
113
- <Fragment>
114
- {option_value ? (
115
- <div class="px-2">
116
- {media.is_link ? (
117
- <a
118
- href={option_value}
119
- title={media.title}
120
- rel="nofollow noopener noreferrer"
121
- target="_blank"
122
- >
123
- <Icon name={media.icon} class:list={["size-5", icon_color]} />
124
- </a>
125
- ) : (
126
- <Icon
127
- name={media.icon}
128
- class:list={["size-5", icon_color]}
129
- title={`${media.title}: ${option_value}`}
130
- />
131
- )}
132
- </div>
133
- ) : null}
134
- </Fragment>
135
- )}
136
- </SiteOptions>
137
- ))
140
+ Astro.slots.has('default') ? (
141
+ <Fragment set:html={html} />
142
+ ) : (
143
+ <Fragment>
144
+ {
145
+ final_social_medias.map((media) => (
146
+ <div class:list={["px-2", icon_color]}>
147
+ {media.is_link ? (
148
+ <a
149
+ href={media.link}
150
+ title={media.title}
151
+ rel="nofollow noopener noreferrer"
152
+ target="_blank"
153
+ >
154
+ <Fragment set:html={media.icon} />
155
+ </a>
156
+ ) : (
157
+ <Fragment set:html={media.icon} />
158
+ )}
159
+ </div>
160
+ ))
161
+ }
162
+ </Fragment>
163
+ )
138
164
  }
165
+
@@ -84,11 +84,11 @@ export default defineIntegration({
84
84
  entrypoint: resolve('./routes/sitemap.xml.ts'),
85
85
  prerender: true
86
86
  });
87
- injectRoute({
88
- pattern: `${viteBase ? `${viteBase}/` : '/'}sitemap.xsl`,
89
- entrypoint: resolve('./routes/sitemap.xsl.ts'),
90
- prerender: true
91
- });
87
+ // injectRoute({
88
+ // pattern: `${viteBase ? `${viteBase}/` : '/'}sitemap.xsl`,
89
+ // entrypoint: resolve('./routes/sitemap.xsl.ts'),
90
+ // prerender: true
91
+ // });
92
92
 
93
93
  injectRoute({
94
94
  pattern: `${viteBase ? `${viteBase}/` : '/'}global.variable.js`,