// Hooks import { serverSideTranslations } from 'next-i18next/serverSideTranslations' // Components import Head from 'next/head' import { MdxWrapper } from 'shared/components/wrappers/mdx.mjs' //import { TocWrapper } from 'shared/components/wrappers/toc.mjs' import { PageWrapper, ns } from 'shared/components/wrappers/page.mjs' // MDX content for each language import EN, { frontmatter as en } from 'markdown/{{{ slug }}}/en.md' import ES, { frontmatter as es } from 'markdown/{{{ slug }}}/es.md' import FR, { frontmatter as fr } from 'markdown/{{{ slug }}}/fr.md' import NL, { frontmatter as nl } from 'markdown/{{{ slug }}}/nl.md' import DE, { frontmatter as de } from 'markdown/{{{ slug }}}/de.md' const fm = { en, es, fr, nl, de } const mdx = { EN, ES, FR, NL, DE } const intro = { en: `{{{ introEN }}}`, es: `{{{ introES }}}`, fr: `{{{ introFR }}}`, nl: `{{{ introNL }}}`, de: `{{{ introDE }}}`, } /* * This page is auto-generated by the prebuild script. * Any changes you make will be overwritten on the next (pre)build. * * See the page-templates folder for more info. */ const DocsPage = ({ page, locale }) => { const frontmatter = fm[locale] const MDX = mdx[locale.toUpperCase()] return ( {frontmatter.title} - FreeSewing.org
{frontmatter.toc && (
{/* FIXME: Implement toc plugin to add it to the frontmatter */} {/* */}
)}
) } export default DocsPage /* * getStaticProps() is used to fetch data at build-time. * To learn more, see: https://nextjs.org/docs/basic-features/data-fetching */ export async function getStaticProps({ locale }) { const translation = await serverSideTranslations(locale, ['docs', ...ns]) return { props: { locale, page: { locale, path: {{{ slugArray }}}, }, ...translation, }, } }