import Page from 'shared/components/wrappers/page.js' import useApp from 'site/hooks/useApp.js' import mdxMeta from 'site/prebuild/mdx.en.js' import mdxLoader from 'shared/mdx/loader' import MdxWrapper from 'shared/components/wrappers/mdx' import Head from 'next/head' import Popout from 'shared/components/popout.js' const MdxPage = props => { // This hook is used for shared code and global state const app = useApp() /* * Each page should be wrapped in the Page wrapper component * You MUST pass it the result of useApp() as the `app` prop * and for MDX pages you can spread the props.page props to it * to automatically set the title and navigation * * Like breadcrumbs and updating the primary navigation with * active state */ return (
Click here to learn how you can help us improve this page
Found a mistake?
You can edit this page on Github and help us improve our documentation.
Does this look ok?

I recently added a backend endpoint to auto-generate pretty (I hope) Open Graph images. They are those little preview images you see when you paste a link in Discord (for example).

This idea is that it will auto-generate an image, but I am certain there are some edge cases where that will not work. There are hundreds of pages on this website and checking them all one by one is not something I see myself doing. But since you are here on this page, perhaps you could see if the image above looks ok.

If it does look ok, then Yay! that is great and no need to do anything.

If it is not ok, please let me know about it. Either by reaching out on Discord or feel free to create an issue on Github.

Thank you, I really appreciate your help with this.

) } /* * Default export is the NextJS page object */ export default MdxPage /* * getStaticProps() is used to fetch data at build-time. * * On this page, it is loading the mdx (markdown) content * from the markdown file on disk. * * This, in combination with getStaticPaths() below means this * page will be used to render/generate all markdown/mdx content. * * To learn more, see: https://nextjs.org/docs/basic-features/data-fetching */ export async function getStaticProps({ params }) { const { mdx, intro } = await mdxLoader('en', 'dev', params.mdxslug.join('/')) return { props: { mdx, intro: intro.join(' '), page: { slug: params.mdxslug.join('/'), path: '/' + params.mdxslug.join('/'), slugArray: params.mdxslug, ...mdxMeta[params.mdxslug.join('/')], }, params } } } /* * getStaticPaths() is used to specify for which routes (think URLs) * this page should be used to generate the result. * * On this page, it is returning a list of routes (think URLs) for all * the mdx (markdown) content. * That list comes from mdxMeta, which is build in the prebuild step * and contains paths, titles, and intro for all markdown. * * To learn more, see: https://nextjs.org/docs/basic-features/data-fetching */ export async function getStaticPaths() { return { paths: Object.keys(mdxMeta).map(slug => '/'+slug), fallback: false } }