import { LoaderFn , redirectTo } from "remastered" ; import { docList } from "../../docList" ; import _ from "lodash" ; export const loader = async ( ) => { const list = await docList ( ) ; let file = list [ 0 ] ; while ( file . type !== "file" ) { file = file . children [ 0 ] ; } return redirectTo ( `/docs/${ file . link }` ) ; } ;