I have my WP instalation on wp.callpage.pl domain
and my frontity instalation on www.calpage.pl domain
I need that on www.callpage.pl/sitemap.xml url i will get sitemap file
and dont understand how to do that, i already read that top
but dont understand where is @frontity/sitemap package
and where i must put that code
export const server = ({ app }) => {
app.use(
get("/sitemap-*.xml", async ctx => {
const origin = ctx.settings.state.sitemap.orign;
const frontityUrl = ctx.settings.state.frontity.url;
// Get the original sitemap from the WordPress site.
const response = await fetch(`${origin}/${ctx.path}`);
const body = await response.text();
// Replace the URLs of WordPress for URLs of Frontity.
ctx.body = body.replaceAll(origin, frontityUrl);
// Do not cache this.
ctx.set("cache-control: no-cache");
})
);
};
Please explain me this method or help to find another