diff --git a/.changeset/stupid-socks-report.md b/.changeset/stupid-socks-report.md new file mode 100644 index 000000000..3ca9fefae --- /dev/null +++ b/.changeset/stupid-socks-report.md @@ -0,0 +1,7 @@ +--- +'@myst-theme/article': patch +'@myst-theme/site': patch +'@myst-theme/book': patch +--- + +Get design fields from options diff --git a/packages/site/src/pages/Article.tsx b/packages/site/src/pages/Article.tsx index d62ae9ed3..45aa96077 100644 --- a/packages/site/src/pages/Article.tsx +++ b/packages/site/src/pages/Article.tsx @@ -35,7 +35,7 @@ export const ArticlePage = React.memo(function ({ }) { const canCompute = useCanCompute(); - const { hide_title_block, hide_footer_links } = (article.frontmatter as any)?.design ?? {}; + const { hide_title_block, hide_footer_links } = (article.frontmatter as any)?.options ?? {}; const tree = copyNode(article.mdast); const keywords = article.frontmatter?.keywords ?? []; diff --git a/themes/article/app/routes/$.tsx b/themes/article/app/routes/$.tsx index 3e4cc9585..437c9f08e 100644 --- a/themes/article/app/routes/$.tsx +++ b/themes/article/app/routes/$.tsx @@ -248,7 +248,7 @@ export function ArticlePage({ article }: { article: PageLoader }) { export default function Page() { // const { container, outline } = useOutlineHeight(); const article = useLoaderData() as PageLoader; - const { hide_outline } = (article.frontmatter as any)?.design ?? {}; + const { hide_outline } = (article.frontmatter as any)?.options ?? {}; return ( diff --git a/themes/book/app/routes/$.tsx b/themes/book/app/routes/$.tsx index 2a455b4cc..ff237a0dd 100644 --- a/themes/book/app/routes/$.tsx +++ b/themes/book/app/routes/$.tsx @@ -96,9 +96,9 @@ export default function Page() { const { container, outline } = useOutlineHeight(); const top = useThemeTop(); const article = useLoaderData() as PageLoader; - const pageDesign: BookThemeTemplateOptions = (article.frontmatter as any)?.design ?? {}; + const pageDesign: BookThemeTemplateOptions = (article.frontmatter as any)?.options ?? {}; const siteDesign: BookThemeTemplateOptions = - (useSiteManifest() as SiteManifest & BookThemeTemplateOptions) ?? {}; + (useSiteManifest() as SiteManifest & BookThemeTemplateOptions)?.options ?? {}; const { hide_toc, hide_outline, hide_footer_links } = { ...siteDesign, ...pageDesign }; return (