Skip to content

Commit

Permalink
Merge pull request #1217 from Sitecore/bugfix/556667-sitemap
Browse files Browse the repository at this point in the history
 #556667: added sitemap.xml for result
  • Loading branch information
illiakovalenko authored Oct 31, 2022
2 parents 1dafd2a + 04e0bf3 commit bb7b142
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/sitecore-jss/src/site/graphql-sitemap-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ export class GraphQLSitemapXmlService {
async getSitemap(id: string): Promise<string | undefined> {
const searchSitemap = `${PREFIX_NAME_SITEMAP}${id}.xml`;
const sitemaps = await this.fetchSitemaps();
// added this item - there is default sitemap when will be available everytime
sitemaps.push('sitemap.xml');

return sitemaps.find((sitemap: string) => sitemap.includes(searchSitemap));
}
Expand Down

0 comments on commit bb7b142

Please sign in to comment.