ISR/Pre-rendering pages (Codegen)

I’ve successfully managed to get ISR working on loader sites, but having absolutely no luck with codegen. I’ve asked a few times but keep being told to refer to docs - I’ve really done my best here but any help would be immensely helpful.

Right now, this is what I’ve got up to for my homepage. This successfuly creates an ISR page but the actual HTML doesn’t contain any prerendered code and the files are practically empty. How do I ensure that the entirety of my page is prerendered?

I’m just talking about static content. I want to get dynamically-rendered content to prerender too, but one thing at a time.

Someone save me :pray:

// This is a skeleton starter React page generated by Plasmic.
// This file is owned by you, feel free to edit as you see fit.
import * as React from "react";
import { PageParamsProvider as PageParamsProvider__ } from "@plasmicapp/react-web/lib/host";
import GlobalContextsProvider from "../components/plasmic/examplesite/PlasmicGlobalContextsProvider";
import { ThemeContext } from "../components/plasmic/examplesite/PlasmicGlobalVariant__Theme";
import { PlasmicHomepage } from "../components/plasmic/examplesite/PlasmicHomepage";
import { useRouter } from "next/router";

import { GetStaticProps } from "next";

export const getStaticProps: GetStaticProps = async () => {
  // Add any data fetching logic here if needed, or return an empty props object
  return {
    props: {}, // Pass any necessary props here
    revalidate: 60, // Revalidate at most every 60 seconds
  };
};

function Homepage(props: any): JSX.Element {
  return (
      <GlobalContextsProvider>
        <PageParamsProvider__
          route={useRouter()?.pathname}
          params={useRouter()?.query}
          query={useRouter()?.query}
        >
          <PlasmicHomepage {...props} />
        </PageParamsProvider__>
      </GlobalContextsProvider>
  );
}

export default Homepage;

I know my code is likely wildly wrong so feel free to be brutal - just need to get this fixed :slight_smile:

More than anything, I need to get this sorted so that I can show opengraph images when sharing links. Right now, it’s just blank as there’s no head data.

If it helps, here’s my _app.tsx also:

import '@/styles/globals.css'
import { PlasmicRootProvider } from "@plasmicapp/react-web";
import type { AppProps } from "next/app";
import Head from "next/head";
import GlobalContextsProvider from "../components/plasmic/examplesite/PlasmicGlobalContextsProvider";
import { GoogleAnalytics } from '@next/third-parties/google';
import '../components/styles.css';

export default function MyApp({ Component, pageProps }: AppProps) {
  return (
    <PlasmicRootProvider Head={Head}>
<GoogleAnalytics gaId="xxxxxx" />
<GlobalContextsProvider>
      <Component {...pageProps} />
</GlobalContextsProvider>
    </PlasmicRootProvider>
  );
}