mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-07-19 21:29:41 +02:00
[Feature] Static pages rendering 🤩 (#274)
This commit is contained in:
parent
8c794304b6
commit
4ad37abed0
20 changed files with 554 additions and 705 deletions
|
@ -84,6 +84,16 @@ const FrontendConfig = z.object({
|
|||
uri: z.string() })])), // Menu for pages
|
||||
});
|
||||
|
||||
/**
|
||||
* Static build configuration
|
||||
*/
|
||||
const StaticBuildConfig = z.object({
|
||||
outputDir: z.string(), // Output directory for static build
|
||||
indexPageUri: z.string(), // URI for index page to render
|
||||
});
|
||||
|
||||
export type StaticBuildConfig = z.infer<typeof StaticBuildConfig>;
|
||||
|
||||
/**
|
||||
* Application configuration
|
||||
*/
|
||||
|
@ -97,6 +107,7 @@ const AppConfig = z.object({
|
|||
frontend: FrontendConfig, // Frontend configuration
|
||||
auth: AuthConfig, // Auth configuration
|
||||
database: z.union([LocalDatabaseConfig, MongoDatabaseConfig]), // Database configuration
|
||||
staticBuild: StaticBuildConfig.optional(), // Static build configuration
|
||||
});
|
||||
|
||||
export type AppConfig = z.infer<typeof AppConfig>;
|
||||
|
@ -107,7 +118,7 @@ const args = arg({ /* eslint-disable @typescript-eslint/naming-convention */
|
|||
});
|
||||
|
||||
const cwd = process.cwd();
|
||||
const paths = (args['--config'] || [ './app-config.yaml' ]).map((configPath) => {
|
||||
const paths = (args['--config'] || [ './docs-config.yaml' ]).map((configPath) => {
|
||||
if (path.isAbsolute(configPath)) {
|
||||
return configPath;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue