diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-12-10 13:40:28 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-12-10 13:40:28 +0700 |
| commit | 141e9113c7dc4483ab049137b4e4ac731657cfb0 (patch) | |
| tree | c97480a76a10c96200bcc19b09075b745705af0f /src/pages/sitemap | |
| parent | b3be7e6d5c320764ef3ca38df196218abf9be25b (diff) | |
<iman> update code
Diffstat (limited to 'src/pages/sitemap')
| -rw-r--r-- | src/pages/sitemap/homepage.xml.js | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/pages/sitemap/homepage.xml.js b/src/pages/sitemap/homepage.xml.js index 08c52112..fa622d5c 100644 --- a/src/pages/sitemap/homepage.xml.js +++ b/src/pages/sitemap/homepage.xml.js @@ -5,29 +5,29 @@ export async function getServerSideProps({ res }) { { label: 'Hubungi Kami', url: 'https://indoteknik.com/hubungi-kami' }, { label: 'Tentang Kami', url: 'https://indoteknik.com/tentang-kami' }, { label: 'Karir', url: 'https://indoteknik.com/karir' }, - { label: 'Daftar Tempo', url: 'https://indoteknik.com/my/pembayaran-tempo' }, + { label: 'Daftar Tempo', url: 'https://indoteknik.com/pembayaran-tempo' }, ]; const sitemap = create('urlset', { encoding: 'utf-8' }).att( 'xmlns', 'http://www.sitemaps.org/schemas/sitemap/0.9' - ) + ); - const date = new Date() + const date = new Date(); links.forEach((link) => { - const url = sitemap.ele('url') - url.ele('loc', link.url) - url.ele('lastmod', date.toISOString().slice(0, 10)) - url.ele('changefreq', 'daily') - url.ele('priority', '1.0') - }) + const url = sitemap.ele('url'); + url.ele('loc', link.url); + url.ele('lastmod', date.toISOString().slice(0, 10)); + url.ele('changefreq', 'daily'); + url.ele('priority', '1.0'); + }); - res.setHeader('Content-Type', 'text/xml') - res.write(sitemap.end()) - res.end() + res.setHeader('Content-Type', 'text/xml'); + res.write(sitemap.end()); + res.end(); - return { props: {} } + return { props: {} }; } export default function SitemapProducts() { - return null + return null; } |
