-
-
Notifications
You must be signed in to change notification settings - Fork 723
Commit
Resolves #1773.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,16 +6,13 @@ import type { DefaultThemeRenderContext } from "../DefaultThemeRenderContext"; | |
export const defaultLayout = (context: DefaultThemeRenderContext, props: PageEvent<Reflection>) => ( | ||
<html class="default"> | ||
<head> | ||
{context.hook("head.begin")} | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
Gerrit0
Author
Collaborator
|
||
<meta charSet="utf-8" /> | ||
<meta http-equiv="x-ua-compatible" content="IE=edge" /> | ||
<title> | ||
{props.model.name === props.project.name ? ( | ||
props.project.name | ||
) : ( | ||
<> | ||
{props.model.name} | {props.project.name} | ||
</> | ||
)} | ||
{props.model.name === props.project.name | ||
? props.project.name | ||
: `${props.model.name} | ${props.project.name}`} | ||
</title> | ||
<meta name="description" content={"Documentation for " + props.project.name} /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
|
@@ -26,8 +23,10 @@ export const defaultLayout = (context: DefaultThemeRenderContext, props: PageEve | |
<link rel="stylesheet" href={context.relativeURL("assets/custom.css")} /> | ||
)} | ||
<script async src={context.relativeURL("assets/search.js")} id="search-script"></script> | ||
{context.hook("head.end")} | ||
</head> | ||
<body> | ||
{context.hook("body.begin")} | ||
<script> | ||
<Raw html='document.body.classList.add(localStorage.getItem("tsd-theme") || "os")' /> | ||
</script> | ||
|
@@ -46,6 +45,7 @@ export const defaultLayout = (context: DefaultThemeRenderContext, props: PageEve | |
<script src={context.relativeURL("assets/main.js")}></script> | ||
|
||
{context.analytics()} | ||
{context.hook("body.end")} | ||
</body> | ||
</html> | ||
); |
@Gerrit0 This hook should probably be after
<meta charSet="utf-8" />
because "<meta>
elements which declare a character encoding must be located entirely within the first 1024 bytes of the document."