@xingwangzhe/stalux 1.24.4 → 1.24.5

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": "@xingwangzhe/stalux",
3
- "version": "1.24.4",
3
+ "version": "1.24.5",
4
4
  "description": "A powerful, modern Astro blog theme — use as template or install as plugin",
5
5
  "keywords": [
6
6
  "astro",
@@ -18,7 +18,7 @@ function badgeImg(opts: Record<string, any>) {
18
18
  const src = svgToDataUrl(generateBadge(opts));
19
19
  const alt = opts.alt || `${opts.label}: ${opts.message}`;
20
20
  if (opts.href) {
21
- return `<a href="${opts.href}" target="_blank" rel="noopener noreferrer"><img src="${src}" alt="${alt}" class="badge" /></a>`;
21
+ return `<a href="${opts.href}" target="_blank" rel="${opts.rel ?? "noopener"}"><img src="${src}" alt="${alt}" class="badge" /></a>`;
22
22
  }
23
23
  return `<img src="${src}" alt="${alt}" class="badge" />`;
24
24
  }
@@ -32,7 +32,7 @@ const icon = link.icon ?? link.avatar ?? "/favicon.ico";
32
32
  class={styles.card + " a-none"}
33
33
  href={href}
34
34
  target="_blank"
35
- rel="noopener noreferrer"
35
+ rel="noopener"
36
36
  >
37
37
  <div class={styles.avatar}>
38
38
  <img
@@ -92,6 +92,7 @@ const badgeFlatSchema = z.object({
92
92
  style: z.string().optional(),
93
93
  alt: z.string().optional(),
94
94
  href: z.string().optional(),
95
+ rel: z.string().optional(),
95
96
  });
96
97
 
97
98
  const badgeGroupSchema = z.object({
@@ -14,6 +14,7 @@ export interface BadgeOptions {
14
14
  logoWidth?: number;
15
15
  alt?: string;
16
16
  href?: string;
17
+ rel?: string;
17
18
  }
18
19
 
19
20
  export interface BadgeGroup {