Right now, only src/index.html is used as the HTML template. This is used in both client and server outputs.
An early wishlist-item was to allow the option for index.html.svelte when using Svelte or index.html.tsx when using Preact/React, for example. These would include the full <html .../> markup, with freshie only auto-prepending the doctype line 😆
Something like this might unlock a better/opinionated freshie system for dealing with meta tags and <title/>, for instance, because not all UI libraries have those abilities built-in like Svelte does. One possibility could be that any context.$ssr object properties would be accessible to this HTML component as render props.
Another thing – index.html.{extn} is just a special/top-level _layout.{extn} file. This means that it can have its own preload function too (user authentication, session data, etc).
The trick thing here is that layout files can only have 1 <slot/> / props.children placement. This makes injecting documeny.head vs document.body content difficult, especially since in the JSX-world, you can't dangerouslySetInnerHTML on a fragment, and you don't necessarily want to setHTML on the head or body outright either. Easy to workaround for body content, but not easy for head.
Right now, only
src/index.html
is used as the HTML template. This is used in both client and server outputs.An early wishlist-item was to allow the option for
index.html.svelte
when using Svelte orindex.html.tsx
when using Preact/React, for example. These would include the full<html .../>
markup, with freshie only auto-prepending thedoctype
line 😆Something like this might unlock a better/opinionated
freshie
system for dealing with meta tags and<title/>
, for instance, because not all UI libraries have those abilities built-in like Svelte does. One possibility could be that anycontext.$ssr
object properties would be accessible to this HTML component as render props.Another thing –
index.html.{extn}
is just a special/top-level_layout.{extn}
file. This means that it can have its ownpreload
function too (user authentication, session data, etc).The trick thing here is that layout files can only have 1
<slot/>
/props.children
placement. This makes injectingdocumeny.head
vsdocument.body
content difficult, especially since in the JSX-world, you can'tdangerouslySetInnerHTML
on a fragment, and you don't necessarily want to setHTML on thehead
orbody
outright either. Easy to workaround for body content, but not easy for head.