@@ -118,10 +118,8 @@ import { RenderFlags } from "../../../command/render/types.ts";
118
118
import { formatLanguage } from "../../../core/language.ts" ;
119
119
import { kComments } from "../../../format/html/format-html-shared.ts" ;
120
120
import { resolvePageFooter } from "../website/website-shared.ts" ;
121
- import {
122
- NavigationItemObject ,
123
- PageFooterRegion ,
124
- } from "../../../resources/types/schema-types.ts" ;
121
+ import { Zod } from "../../../resources/types/zod/schema-types.ts" ;
122
+ import { PageFooterRegion } from "../../../resources/types/schema-types.ts" ;
125
123
import { projectType } from "../project-types.ts" ;
126
124
import { BookRenderItem , BookRenderItemType } from "./book-types.ts" ;
127
125
import { isAbsoluteRef } from "../../../core/http.ts" ;
@@ -145,7 +143,7 @@ export async function bookProjectConfig(
145
143
if ( ! site [ kSiteFavicon ] ) {
146
144
const brand = await project . resolveBrand ( ) ;
147
145
if ( brand ?. light ) {
148
- site [ kSiteFavicon ] = getFavicon ( brand . light ) ; //
146
+ site [ kSiteFavicon ] = getFavicon ( brand . light ) ; //
149
147
}
150
148
}
151
149
site [ kSiteUrl ] = book [ kSiteUrl ] ;
@@ -259,13 +257,12 @@ export async function bookProjectConfig(
259
257
const footerFiles : string [ ] = [ ] ;
260
258
const pageFooter = resolvePageFooter ( config ) ;
261
259
const addFooterItems = ( region ?: PageFooterRegion ) => {
262
- if ( region ) {
263
- for ( const item of region ) {
264
- if ( typeof item !== "string" ) {
265
- const navItem = item as NavigationItemObject ;
266
- if ( navItem . href && ! isAbsoluteRef ( navItem . href ) ) {
267
- footerFiles . push ( navItem . href ) ;
268
- }
260
+ if ( ! region ) return ;
261
+ for ( const item of region ) {
262
+ if ( typeof item !== "string" ) {
263
+ const navItem = Zod . NavigationItemObject . parse ( item ) ;
264
+ if ( navItem . href && ! isAbsoluteRef ( navItem . href ) ) {
265
+ footerFiles . push ( navItem . href ) ;
269
266
}
270
267
}
271
268
}
0 commit comments