mirror of https://github.com/sveltejs/svelte
parent
98515a9a88
commit
5d1cb84839
@ -1,17 +1,15 @@
|
||||
export const prerender = true;
|
||||
|
||||
export async function load({ url }) {
|
||||
const is_docs_index = url.pathname === '/docs';
|
||||
|
||||
if (!is_docs_index) {
|
||||
const { get_docs_data, get_docs_list } = await import('$lib/server/docs/index.js');
|
||||
|
||||
if (url.pathname === '/docs') {
|
||||
return {
|
||||
sections: url.pathname === '/docs' ? [] : get_docs_list(get_docs_data())
|
||||
sections: []
|
||||
};
|
||||
}
|
||||
|
||||
const { get_docs_data, get_docs_list } = await import('$lib/server/docs/index.js');
|
||||
|
||||
return {
|
||||
sections: []
|
||||
sections: get_docs_list(get_docs_data())
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
Reference in new issue