diff --git a/package.json b/package.json index 8c298eb44b..a5fff8c7e9 100644 --- a/package.json +++ b/package.json @@ -116,6 +116,7 @@ "remark-lint-maximum-heading-length": "^4.1.1", "remark-lint-maximum-line-length": "^4.1.1", "remark-lint-no-file-name-irregular-characters": "^3.0.1", + "remark-lint-no-heading-punctuation": "^4.0.1", "remark-lint-ordered-list-marker-value": "^4.0.1", "remark-parse": "^11.0.0", "remark-rehype": "^11.1.2", @@ -158,6 +159,10 @@ [ "remark-lint-maximum-line-length", 120 + ], + [ + "remark-lint-no-heading-punctuation", + ":" ] ] } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6466129f7f..723dacafd6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -148,6 +148,9 @@ importers: remark-lint-no-file-name-irregular-characters: specifier: ^3.0.1 version: 3.0.1 + remark-lint-no-heading-punctuation: + specifier: ^4.0.1 + version: 4.0.1 remark-lint-ordered-list-marker-value: specifier: ^4.0.1 version: 4.0.1 diff --git a/src/components/Button.astro b/src/components/Button.astro index 327aebdef1..f37a8a9e35 100644 --- a/src/components/Button.astro +++ b/src/components/Button.astro @@ -10,6 +10,7 @@ export interface Props { icon?: string; variant?: 'ghost' | 'solid' | 'primary' | 'secondary'; target?: string; + rel?: string; } const { colorScheme, @@ -18,8 +19,17 @@ const { icon, variant = 'solid', target = '_blank', + rel, } = Astro.props as Props; +// Secure default: target="_blank" ALWAYS carries 'noopener noreferrer' to +// prevent tabnabbing. If the caller passes a `rel`, we merge tokens (deduped) +// rather than letting the caller drop the security tokens. +const callerRelTokens = rel?.split(/\s+/).filter(Boolean) ?? []; +const securityTokens = target === '_blank' ? ['noopener', 'noreferrer'] : []; +const mergedRel = [...new Set([...callerRelTokens, ...securityTokens])].join(' '); +const computedRel = mergedRel || undefined; + const isPrimary = variant === 'primary'; const isSecondary = variant === 'secondary'; const classes = [ @@ -30,7 +40,7 @@ const classes = [ ---
+ Mergify eliminates broken builds, tames flaky tests, and cuts CI waste — so your team + ships with confidence. +
+Share feedback, ask questions, and see what other teams build with Mergify.