Skip to content

Commit

Permalink
Add items to sitemap
Browse files Browse the repository at this point in the history
  • Loading branch information
gocemitevski committed Feb 1, 2024
1 parent bd386fd commit 27ae03b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/buildSitemap.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ const municipalitiesSort = () => {
return sortedMunicipalities;
};

const homepage = `https://gocemitevski.github.io/osnovni-ucilista-mk/?`;
const homepage = `https://gocemitevski.github.io/osnovni-ucilista-mk`;
const sitemap = data.records.map(item => `${homepage}/uchilishte/${encodeURIComponent(cleanName(transliterate(item[3] + ' ' + item[2])).toLowerCase())}`);
sitemap.push(`${homepage}/opshtina/${encodeURIComponent(cleanName(transliterate(skopjeTitle)).toLowerCase())}/`);
sitemap.push(`${homepage}/adresar`);
sitemap.push(`${homepage}/za-izrabotkata`);
municipalitiesSort().map(item => sitemap.push(`${homepage}/opshtina/${encodeURIComponent(cleanName(transliterate(item[0])).toLowerCase())}`));
console.log(`<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">${sitemap.map(el => `<url><loc>${el}</loc></url>`).join('')}</urlset>`);

0 comments on commit 27ae03b

Please sign in to comment.