File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9191 <GitHubIcon class =" size-3.5" />
9292 </MotionDiv >
9393 </a >
94- <a
95- href ={npmUrl }
96- target =" _blank"
97- rel =" noopener noreferrer"
98- class =" inline-flex items-center justify-center text-text-muted hover:text-text-secondary"
99- aria-label =" NPM"
100- >
101- <MotionDiv
102- class =" inline-flex size-6 items-center justify-center rounded-full border border-border-muted transition-colors hover:border-border-mid"
103- whileTap ={tapScale }
104- whileHover ={hoverScaleIcon }
94+ {#if ! config .hideNpm }
95+ <a
96+ href ={npmUrl }
97+ target =" _blank"
98+ rel =" noopener noreferrer"
99+ class =" inline-flex items-center justify-center text-text-muted hover:text-text-secondary"
100+ aria-label =" NPM"
105101 >
106- <NpmIcon class =" size-3.5" />
107- </MotionDiv >
108- </a >
102+ <MotionDiv
103+ class =" inline-flex size-6 items-center justify-center rounded-full border border-border-muted transition-colors hover:border-border-mid"
104+ whileTap ={tapScale }
105+ whileHover ={hoverScaleIcon }
106+ >
107+ <NpmIcon class =" size-3.5" />
108+ </MotionDiv >
109+ </a >
110+ {/if }
109111 </div >
110112 </header >
111113</div >
Original file line number Diff line number Diff line change 190190 <GitHubIcon class =" size-3.5" />
191191 </MotionDiv >
192192 </a >
193- <a
194- href ={npmUrl }
195- target =" _blank"
196- rel =" noopener noreferrer"
197- class =" dk-icon-link dk-npm-link"
198- aria-label =" NPM"
199- >
200- <MotionDiv
201- class =" dk-icon-square"
202- whileTap ={tapScale }
203- whileHover ={hoverScaleIcon }
193+ {#if ! config .hideNpm }
194+ <a
195+ href ={npmUrl }
196+ target =" _blank"
197+ rel =" noopener noreferrer"
198+ class =" dk-icon-link dk-npm-link"
199+ aria-label =" NPM"
204200 >
205- <NpmIcon class =" size-3.5" />
206- </MotionDiv >
207- </a >
201+ <MotionDiv
202+ class =" dk-icon-square"
203+ whileTap ={tapScale }
204+ whileHover ={hoverScaleIcon }
205+ >
206+ <NpmIcon class =" size-3.5" />
207+ </MotionDiv >
208+ </a >
209+ {/if }
208210 </div >
209211 </div >
210212
Original file line number Diff line number Diff line change @@ -7,6 +7,12 @@ export interface DocsKitConfig {
77 npmPackage : string
88 /** Optional override for the header npm icon URL */
99 npmUrl ?: string
10+ /**
11+ * Hide the npm icon in the header. Set this on sites that aren't
12+ * published as an npm package (e.g. a standalone product site) so the
13+ * header shows only the GitHub icon.
14+ */
15+ hideNpm ?: boolean
1016 /** GitHub repo in owner/name format, e.g. 'humanspeak/svelte-markdown' */
1117 repo : string
1218 /** Optional override for the header GitHub icon URL */
You can’t perform that action at this time.
0 commit comments