@@ -6,6 +6,7 @@ import { useFieldArray, useWatch } from "react-hook-form"
66
77import { Button } from "ui/button"
88import { FieldDescription , FieldLabel , FieldSet } from "ui/field"
9+ import { Input } from "ui/input"
910import { MonacoFormField } from "ui/monaco"
1011import { FieldOutputMap } from "ui/outputMap"
1112import { usePubFieldContext } from "ui/pubFields"
@@ -154,6 +155,25 @@ export default function BuildSiteActionForm() {
154155 />
155156 </ div >
156157
158+ < div >
159+ < FieldLabel className = "text-xs" > File Extension</ FieldLabel >
160+ < FieldDescription className = "text-xs" >
161+ Output file type. Only "html" pages are wrapped in an HTML
162+ shell.
163+ </ FieldDescription >
164+ < ActionField
165+ name = { `pages.${ index } .extension` }
166+ render = { ( { field } ) => (
167+ < Input
168+ { ...field }
169+ value = { field . value ?? "html" }
170+ placeholder = "html"
171+ className = "h-8 text-sm"
172+ />
173+ ) }
174+ />
175+ </ div >
176+
157177 < div >
158178 < div className = "mb-1 flex items-center justify-between" >
159179 < FieldLabel className = "text-xs" > Content Template</ FieldLabel >
@@ -224,7 +244,12 @@ export default function BuildSiteActionForm() {
224244 type = "button"
225245 size = "sm"
226246 onClick = { ( ) =>
227- append ( { filter : "" , slug : "$.pub.id" , transform : DEFAULT_PAGE_TEMPLATE } )
247+ append ( {
248+ filter : "" ,
249+ slug : "$.pub.id" ,
250+ transform : DEFAULT_PAGE_TEMPLATE ,
251+ extension : "html" ,
252+ } )
228253 }
229254 >
230255 < Plus size = { 14 } className = "mr-1" />
0 commit comments