mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-07-18 20:59:42 +02:00
Added enable parameter for rendering index page (#289)
This commit is contained in:
parent
8a8db5c136
commit
d3e0cb176c
3 changed files with 9 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "codex.docs",
|
||||
"license": "Apache-2.0",
|
||||
"version": "v2.0.0-rc.4",
|
||||
"version": "v2.2.0-rc.1",
|
||||
"type": "module",
|
||||
"bin": {
|
||||
"codex.docs": "dist/backend/app.js"
|
||||
|
|
|
@ -111,7 +111,10 @@ export default async function buildStatic(): Promise<void> {
|
|||
await renderPage(page);
|
||||
}
|
||||
|
||||
await renderIndexPage(config.indexPageUri);
|
||||
// Check if index page is enabled
|
||||
if (config.indexPage.enabled) {
|
||||
await renderIndexPage(config.indexPage.uri);
|
||||
}
|
||||
console.log('Static files built');
|
||||
|
||||
console.log('Copy public directory');
|
||||
|
|
|
@ -90,7 +90,10 @@ const FrontendConfig = z.object({
|
|||
*/
|
||||
const StaticBuildConfig = z.object({
|
||||
outputDir: z.string(), // Output directory for static build
|
||||
indexPageUri: z.string(), // URI for index page to render
|
||||
indexPage: z.object({
|
||||
enabled: z.boolean(), // Is index page enabled
|
||||
uri: z.string(), // Index page uri
|
||||
}),
|
||||
});
|
||||
|
||||
export type StaticBuildConfig = z.infer<typeof StaticBuildConfig>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue