Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MultiSite] SSG support #1284

Merged
merged 10 commits into from
Jan 12, 2023
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import { GraphQLSitemapService } from '@sitecore-jss/sitecore-jss-nextjs';
import {
GraphQLSitemapService,
StaticPath,
constants,
siteInfo,
} from '@sitecore-jss/sitecore-jss-nextjs';
import config from 'temp/config';
import { SitemapFetcherPlugin } from '..';
import { GetStaticPathsContext } from 'next';
import { StaticPath, constants } from '@sitecore-jss/sitecore-jss-nextjs';
import siteResolver from 'lib/site-resolver';

class GraphqlSitemapServicePlugin implements SitemapFetcherPlugin {
_graphqlSitemapService: GraphQLSitemapService;
Expand All @@ -11,7 +16,7 @@ class GraphqlSitemapServicePlugin implements SitemapFetcherPlugin {
this._graphqlSitemapService = new GraphQLSitemapService({
endpoint: config.graphQLEndpoint,
apiKey: config.sitecoreApiKey,
siteName: config.jssAppName,
sites: siteResolver.sites.map((site: siteInfo) => site.name),
});
}

Expand Down
Loading