Closed dimaMachina closed 1 year ago
In Envelop all plugins retrieved with remote-mdx via getStaticPaths/getStaticProps in plugins/[name].mdx file.
getStaticPaths
getStaticProps
plugins/[name].mdx
Need find a workaround to set title since frontMatter.title is undefined and there is no first heading#
frontMatter.title
undefined
#
P.S. tried with NextHead but title rollbacks to frontMatter.title/first heading# that is undefined
export const PluginPage = () => { const { compiledSource, title } = useSSG() return ( <> <Head> <title>{title}</title> </Head> <MDXRemote compiledSource={compiledSource} components={{ PackageCmd }} /> </> ) }
https://user-images.githubusercontent.com/7361780/193795822-46b31d56-c31b-4144-8380-22be8f6e7bd4.mov
Maybe we need to fix it in nextra
https://github.com/shuding/nextra/blob/a04c128c240fdc1fd43f8f1bb6961a0eb99872eb/packages/nextra-theme-docs/src/components/head.tsx#L23
to not render title tag if title is falsy
falsy
fixed by https://github.com/n1ru4l/envelop/pull/1731
In Envelop all plugins retrieved with remote-mdx via
getStaticPaths
/getStaticProps
inplugins/[name].mdx
file.Need find a workaround to set title since
frontMatter.title
isundefined
and there is no first heading#
P.S. tried with NextHead but title rollbacks to
frontMatter.title
/first heading#
that isundefined
https://user-images.githubusercontent.com/7361780/193795822-46b31d56-c31b-4144-8380-22be8f6e7bd4.mov
Maybe we need to fix it in nextra
https://github.com/shuding/nextra/blob/a04c128c240fdc1fd43f8f1bb6961a0eb99872eb/packages/nextra-theme-docs/src/components/head.tsx#L23
to not render title tag if title is
falsy