File tree Expand file tree Collapse file tree 4 files changed +1
-51
lines changed Expand file tree Collapse file tree 4 files changed +1
-51
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11import { z } from "astro:schema" ;
22import type { SchemaContext } from "astro:content" ;
33
4- import { sidebar , SidebarIconSchema } from "./types/sidebar" ;
4+ import { sidebar } from "./types/sidebar" ;
55
66const spotlightAuthorDetails = z
77 . object ( {
@@ -143,7 +143,6 @@ export const baseSchema = ({ image }: SchemaContext) =>
143143 . describe (
144144 "Displays a [Banner](https://developers.cloudflare.com/style-guide/frontmatter/banner/) on the current docs page." ,
145145 ) ,
146- icon : SidebarIconSchema ( ) ,
147146 feedback : z
148147 . boolean ( )
149148 . default ( true )
Original file line number Diff line number Diff line change @@ -49,14 +49,6 @@ const BadgeConfigSchema = () =>
4949 } )
5050 . optional ( ) ;
5151
52- export const SidebarIconSchema = ( ) =>
53- z
54- . object ( {
55- lottieLink : z . string ( ) ,
56- color : z . enum ( [ "primary" ] ) . optional ( ) ,
57- } )
58- . optional ( ) ;
59-
6052export const sidebar = z
6153 . object ( {
6254 order : z . number ( ) . optional ( ) ,
@@ -79,7 +71,6 @@ export const sidebar = z
7971 "Hides the index page from the sidebar. Refer to [Sidebar](/style-guide/frontmatter/sidebar/)." ,
8072 ) ,
8173 badge : BadgeConfigSchema ( ) ,
82- icon : SidebarIconSchema ( ) ,
8374 } )
8475 . optional ( ) ,
8576 } )
Original file line number Diff line number Diff line change @@ -6,11 +6,9 @@ import { externalLinkArrow } from "~/plugins/rehype/external-links";
66
77type Link = Extract < StarlightRouteData [ "sidebar" ] [ 0 ] , { type : "link" } > & {
88 order ?: number ;
9- icon ?: { lottieLink : string } ;
109} ;
1110type Group = Extract < StarlightRouteData [ "sidebar" ] [ 0 ] , { type : "group" } > & {
1211 order ?: number ;
13- icon ?: { lottieLink : string } ;
1412} ;
1513
1614export type SidebarEntry = Link | Group ;
@@ -201,7 +199,6 @@ async function handleGroup(group: Group): Promise<SidebarEntry> {
201199
202200 const frontmatter = entry . data ;
203201
204- group . icon = frontmatter . sidebar . group ?. icon ?? frontmatter . icon ;
205202 group . label = frontmatter . sidebar . group ?. label ?? frontmatter . title ;
206203 group . order = frontmatter . sidebar . order ?? Number . MAX_VALUE ;
207204
@@ -213,7 +210,6 @@ async function handleGroup(group: Group): Promise<SidebarEntry> {
213210 return {
214211 type : "link" ,
215212 href : index . href ,
216- icon : group . icon ,
217213 label : group . label ,
218214 order : group . order ,
219215 attrs : {
@@ -288,7 +284,6 @@ async function handleLink(link: Link): Promise<Link> {
288284 if ( frontmatter . external_link && ! frontmatter . sidebar . group ?. hideIndex ) {
289285 return {
290286 ...link ,
291- icon : frontmatter . icon ,
292287 label : link . label . concat ( externalLinkArrow ) ,
293288 href : frontmatter . external_link ,
294289 badge : frontmatter . external_link . startsWith ( "/api" )
You can’t perform that action at this time.
0 commit comments