🐛 Fixed missing index page from pages sitemaps

closes https://github.com/TryGhost/Ghost/issues/14180
refs 597ec51afb

- The index page `/` was missing from sitemaps.xml. It was a regression instoruced with a referenced commit.
This commit is contained in:
Naz 2022-02-28 22:23:11 +07:00
parent f9fccc43a2
commit b9e26c836b
2 changed files with 3 additions and 1 deletions

View File

@ -35,7 +35,7 @@ class RouterManager {
routerCreated(router) { routerCreated(router) {
// NOTE: this event should be become an "internal frontend even" // NOTE: this event should be become an "internal frontend even"
// and should not be consumed by the modules outside the frontend // and should not be consumed by the modules outside the frontend
events.emit('router.created', this); events.emit('router.created', router);
// CASE: there are router types which do not generate resource urls // CASE: there are router types which do not generate resource urls
// e.g. static route router, in this case we don't want ot notify the URL service // e.g. static route router, in this case we don't want ot notify the URL service

View File

@ -378,6 +378,8 @@ describe('Default Frontend routing', function () {
.expect(assertCorrectFrontendHeaders) .expect(assertCorrectFrontendHeaders)
.expect((res) => { .expect((res) => {
res.text.should.match(/urlset/); res.text.should.match(/urlset/);
// CASE: the index page should always be present in pages sitemap
res.text.should.containEql('<loc>http://127.0.0.1:2369/</loc>');
res.text.should.not.containEql('__GHOST_URL__'); res.text.should.not.containEql('__GHOST_URL__');
}); });
}); });