Massive update to html rendering
This commit is contained in:
parent
d550f057c5
commit
10c84d2dce
5 changed files with 25 additions and 33 deletions
|
@ -1,5 +1,6 @@
|
|||
import path from "node:path";
|
||||
import {
|
||||
IDSchema,
|
||||
PlaybillSchema,
|
||||
type Playbill,
|
||||
type UnknownResource,
|
||||
|
@ -14,6 +15,12 @@ const HTMLRenderOptionsSchema = z.object({
|
|||
styles: z.array(z.string()).optional(),
|
||||
});
|
||||
|
||||
const PageDefinitionSchema = z.object({
|
||||
id: z.string(),
|
||||
title: z.string(),
|
||||
resources: z.array(IDSchema),
|
||||
});
|
||||
|
||||
const BindingFileSchema = z.object({
|
||||
$binding: z.literal("playbill"),
|
||||
extends: z.string().optional(),
|
||||
|
@ -25,6 +32,8 @@ const BindingFileSchema = z.object({
|
|||
files: z.array(z.string()).default(["**/*.yaml", "**/*.md"]),
|
||||
|
||||
html: HTMLRenderOptionsSchema.optional(),
|
||||
|
||||
pages: PageDefinitionSchema.array().optional(),
|
||||
});
|
||||
|
||||
type BindingFileContent = z.infer<typeof BindingFileSchema>;
|
||||
|
@ -45,6 +54,7 @@ export interface PlaybillBinding {
|
|||
description: string;
|
||||
|
||||
html?: z.infer<typeof HTMLRenderOptionsSchema>;
|
||||
pages?: z.infer<typeof PageDefinitionSchema>[];
|
||||
|
||||
playbill: Playbill;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue