From eeb28709802ac60f481ed46f61622f0c5be6f676 Mon Sep 17 00:00:00 2001 From: manya706 Date: Mon, 7 Oct 2024 22:51:26 +0530 Subject: [PATCH 01/16] initialized sitemap --- src/app/sitemap.ts | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 src/app/sitemap.ts diff --git a/src/app/sitemap.ts b/src/app/sitemap.ts new file mode 100644 index 000000000..b46e43e2d --- /dev/null +++ b/src/app/sitemap.ts @@ -0,0 +1,42 @@ +import { MetadataRoute } from 'next' + +export default function sitemap(): MetadataRoute.Sitemap { + return [ + { + url: 'https://virtualcoffee.io', + lastModified: new Date(), + changeFrequency: 'yearly', + priority: 1, + }, + { + url: 'https://virtualcoffee.io/about', + lastModified: new Date(), + changeFrequency: 'monthly', + priority: 0.8, + }, + { + url: 'https://virtualcoffee.io/blog', + lastModified: new Date(), + changeFrequency: 'weekly', + priority: 0.5, + }, + { + url: 'https://virtualcoffee.io/events', + lastModified: new Date(), + changeFrequency: 'weekly', + priority: 0.6, + }, + { + url: 'https://virtualcoffee.io/podcast', + lastModified: new Date(), + changeFrequency: 'monthly', + priority: 0.7, + }, + { + url: 'https://virtualcoffee.io/contact', + lastModified: new Date(), + changeFrequency: 'yearly', + priority: 0.4, + }, + ] +} \ No newline at end of file From 88034da9777547fd0521847dfba4b41480ec77c0 Mon Sep 17 00:00:00 2001 From: manya706 Date: Mon, 7 Oct 2024 22:58:19 +0530 Subject: [PATCH 02/16] added script to generate sitemap --- scripts/generate-sitemap.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 scripts/generate-sitemap.js diff --git a/scripts/generate-sitemap.js b/scripts/generate-sitemap.js new file mode 100644 index 000000000..dd2c8fdbe --- /dev/null +++ b/scripts/generate-sitemap.js @@ -0,0 +1,20 @@ +const fs = require('fs'); +const path = require('path'); +const { sitemap } = require('../src/app/sitemap.ts'); + +const sitemapContent = sitemap().map(entry => ` + + ${entry.url} + ${entry.lastModified.toISOString()} + ${entry.changeFrequency} + ${entry.priority} + +`).join(''); + +const sitemapXml = ` + + ${sitemapContent} +`; + +fs.writeFileSync(path.join(__dirname, '../public/sitemap.xml'), sitemapXml, 'utf8'); +console.log('Sitemap generated successfully.'); \ No newline at end of file From 0f64242a622d8c53e69b89e3a37e67e99962319c Mon Sep 17 00:00:00 2001 From: manya706 Date: Tue, 8 Oct 2024 00:02:15 +0530 Subject: [PATCH 03/16] fixed generate sitemap --- scripts/generate-sitemap.js | 20 ------------ .../generate-sitemap.mjs | 31 +++++++++++++++++-- 2 files changed, 28 insertions(+), 23 deletions(-) delete mode 100644 scripts/generate-sitemap.js rename src/app/sitemap.ts => scripts/generate-sitemap.mjs (51%) diff --git a/scripts/generate-sitemap.js b/scripts/generate-sitemap.js deleted file mode 100644 index dd2c8fdbe..000000000 --- a/scripts/generate-sitemap.js +++ /dev/null @@ -1,20 +0,0 @@ -const fs = require('fs'); -const path = require('path'); -const { sitemap } = require('../src/app/sitemap.ts'); - -const sitemapContent = sitemap().map(entry => ` - - ${entry.url} - ${entry.lastModified.toISOString()} - ${entry.changeFrequency} - ${entry.priority} - -`).join(''); - -const sitemapXml = ` - - ${sitemapContent} -`; - -fs.writeFileSync(path.join(__dirname, '../public/sitemap.xml'), sitemapXml, 'utf8'); -console.log('Sitemap generated successfully.'); \ No newline at end of file diff --git a/src/app/sitemap.ts b/scripts/generate-sitemap.mjs similarity index 51% rename from src/app/sitemap.ts rename to scripts/generate-sitemap.mjs index b46e43e2d..8da9e089c 100644 --- a/src/app/sitemap.ts +++ b/scripts/generate-sitemap.mjs @@ -1,6 +1,11 @@ -import { MetadataRoute } from 'next' +import fs from 'fs'; +import path from 'path'; +import { fileURLToPath } from 'url'; -export default function sitemap(): MetadataRoute.Sitemap { +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); + +function sitemap() { return [ { url: 'https://virtualcoffee.io', @@ -39,4 +44,24 @@ export default function sitemap(): MetadataRoute.Sitemap { priority: 0.4, }, ] -} \ No newline at end of file +} + +console.log('Generating sitemap...'); + +const sitemapContent = sitemap().map(entry => ` + + ${entry.url} + ${entry.lastModified.toISOString()} + ${entry.changeFrequency} + ${entry.priority} + +`).join(''); + +const sitemapXml = ` + + ${sitemapContent} +`; + +const outputPath = path.join(__dirname, '../public/sitemap.xml'); +fs.writeFileSync(outputPath, sitemapXml, 'utf8'); +console.log(`Sitemap generated successfully at ${outputPath}`); \ No newline at end of file From cb156bb9881a7437d2c27a42fe1ea04dbcf28313 Mon Sep 17 00:00:00 2001 From: manya706 Date: Tue, 8 Oct 2024 00:03:07 +0530 Subject: [PATCH 04/16] added postbuild script --- package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 69269919e..ec28fde12 100644 --- a/package.json +++ b/package.json @@ -13,10 +13,12 @@ "build-member-files": "node scripts/loadMemberFiles.js", "local-dev": "cross-env NODE_ENV=development pnpm netlify dev", "build": "next build", + "postbuild": "pnpm generate-sitemap", "start": "next start", "prebuild": "pnpm build-member-files", "watch": "npm-watch", - "dev": "pnpm build-member-files && concurrently \"pnpm watch\" \"pnpm local-dev\"" + "dev": "pnpm build-member-files && concurrently \"pnpm watch\" \"pnpm local-dev\"", + "generate-sitemap": "node scripts/generate-sitemap.mjs" }, "watch": { "build-member-files": "src/content/members/**/*.ts" From a5f6a4c9f6a13786656b5e505d5682090fb79169 Mon Sep 17 00:00:00 2001 From: manya706 Date: Tue, 8 Oct 2024 00:03:24 +0530 Subject: [PATCH 05/16] sitemap created --- public/sitemap.xml | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 public/sitemap.xml diff --git a/public/sitemap.xml b/public/sitemap.xml new file mode 100644 index 000000000..b954952ad --- /dev/null +++ b/public/sitemap.xml @@ -0,0 +1,46 @@ + + + + + https://virtualcoffee.io + 2024-10-07T18:30:23.482Z + yearly + 1 + + + + https://virtualcoffee.io/about + 2024-10-07T18:30:23.482Z + monthly + 0.8 + + + + https://virtualcoffee.io/blog + 2024-10-07T18:30:23.482Z + weekly + 0.5 + + + + https://virtualcoffee.io/events + 2024-10-07T18:30:23.482Z + weekly + 0.6 + + + + https://virtualcoffee.io/podcast + 2024-10-07T18:30:23.482Z + monthly + 0.7 + + + + https://virtualcoffee.io/contact + 2024-10-07T18:30:23.482Z + yearly + 0.4 + + + \ No newline at end of file From a8e5e823f37247eca2b3ab1e87d8fab8d95a9d3b Mon Sep 17 00:00:00 2001 From: manya706 Date: Fri, 11 Oct 2024 17:24:37 +0530 Subject: [PATCH 06/16] removed /blog --- scripts/generate-sitemap.mjs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/scripts/generate-sitemap.mjs b/scripts/generate-sitemap.mjs index 8da9e089c..7dcb4e2e0 100644 --- a/scripts/generate-sitemap.mjs +++ b/scripts/generate-sitemap.mjs @@ -19,12 +19,6 @@ function sitemap() { changeFrequency: 'monthly', priority: 0.8, }, - { - url: 'https://virtualcoffee.io/blog', - lastModified: new Date(), - changeFrequency: 'weekly', - priority: 0.5, - }, { url: 'https://virtualcoffee.io/events', lastModified: new Date(), From a350b4ef93f7c863fce9892dd1537d1e0833fc23 Mon Sep 17 00:00:00 2001 From: manya706 Date: Fri, 11 Oct 2024 11:55:09 +0000 Subject: [PATCH 07/16] Prettified Code! --- scripts/generate-sitemap.mjs | 74 +++++++++++++++++++----------------- 1 file changed, 39 insertions(+), 35 deletions(-) diff --git a/scripts/generate-sitemap.mjs b/scripts/generate-sitemap.mjs index 7dcb4e2e0..744ee296c 100644 --- a/scripts/generate-sitemap.mjs +++ b/scripts/generate-sitemap.mjs @@ -6,50 +6,54 @@ const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); function sitemap() { - return [ - { - url: 'https://virtualcoffee.io', - lastModified: new Date(), - changeFrequency: 'yearly', - priority: 1, - }, - { - url: 'https://virtualcoffee.io/about', - lastModified: new Date(), - changeFrequency: 'monthly', - priority: 0.8, - }, - { - url: 'https://virtualcoffee.io/events', - lastModified: new Date(), - changeFrequency: 'weekly', - priority: 0.6, - }, - { - url: 'https://virtualcoffee.io/podcast', - lastModified: new Date(), - changeFrequency: 'monthly', - priority: 0.7, - }, - { - url: 'https://virtualcoffee.io/contact', - lastModified: new Date(), - changeFrequency: 'yearly', - priority: 0.4, - }, - ] + return [ + { + url: 'https://virtualcoffee.io', + lastModified: new Date(), + changeFrequency: 'yearly', + priority: 1, + }, + { + url: 'https://virtualcoffee.io/about', + lastModified: new Date(), + changeFrequency: 'monthly', + priority: 0.8, + }, + { + url: 'https://virtualcoffee.io/events', + lastModified: new Date(), + changeFrequency: 'weekly', + priority: 0.6, + }, + { + url: 'https://virtualcoffee.io/podcast', + lastModified: new Date(), + changeFrequency: 'monthly', + priority: 0.7, + }, + { + url: 'https://virtualcoffee.io/contact', + lastModified: new Date(), + changeFrequency: 'yearly', + priority: 0.4, + }, + ]; } console.log('Generating sitemap...'); -const sitemapContent = sitemap().map(entry => ` +const sitemapContent = sitemap() + .map( + (entry) => ` ${entry.url} ${entry.lastModified.toISOString()} ${entry.changeFrequency} ${entry.priority} -`).join(''); +`, + ) + .join(''); const sitemapXml = ` @@ -58,4 +62,4 @@ const sitemapXml = ` const outputPath = path.join(__dirname, '../public/sitemap.xml'); fs.writeFileSync(outputPath, sitemapXml, 'utf8'); -console.log(`Sitemap generated successfully at ${outputPath}`); \ No newline at end of file +console.log(`Sitemap generated successfully at ${outputPath}`); From 5fc7a6c70cc28b026c766957526af78b851de833 Mon Sep 17 00:00:00 2001 From: manya706 Date: Fri, 11 Oct 2024 17:25:18 +0530 Subject: [PATCH 08/16] added sitemap in gitignore --- .gitignore | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 705a0992c..e92a84dba 100644 --- a/.gitignore +++ b/.gitignore @@ -44,4 +44,7 @@ yarn-error.log* # typescript *.tsbuildinfo -next-env.d.ts \ No newline at end of file +next-env.d.ts + +# misc +/public/sitemap.xml \ No newline at end of file From 25fb8f2c6910760115642cac99668a733bc2494d Mon Sep 17 00:00:00 2001 From: manya706 Date: Fri, 11 Oct 2024 17:27:47 +0530 Subject: [PATCH 09/16] removed sitemap.xml --- public/sitemap.xml | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 public/sitemap.xml diff --git a/public/sitemap.xml b/public/sitemap.xml deleted file mode 100644 index b954952ad..000000000 --- a/public/sitemap.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - https://virtualcoffee.io - 2024-10-07T18:30:23.482Z - yearly - 1 - - - - https://virtualcoffee.io/about - 2024-10-07T18:30:23.482Z - monthly - 0.8 - - - - https://virtualcoffee.io/blog - 2024-10-07T18:30:23.482Z - weekly - 0.5 - - - - https://virtualcoffee.io/events - 2024-10-07T18:30:23.482Z - weekly - 0.6 - - - - https://virtualcoffee.io/podcast - 2024-10-07T18:30:23.482Z - monthly - 0.7 - - - - https://virtualcoffee.io/contact - 2024-10-07T18:30:23.482Z - yearly - 0.4 - - - \ No newline at end of file From 0604083aa588fd39472f0986bfe5f533bb90a742 Mon Sep 17 00:00:00 2001 From: manya706 Date: Sun, 13 Oct 2024 00:31:02 +0530 Subject: [PATCH 10/16] not able to locate file [currently working on it] --- scripts/generate-sitemap.mjs | 121 ++++++++++++++++++++--------------- 1 file changed, 68 insertions(+), 53 deletions(-) diff --git a/scripts/generate-sitemap.mjs b/scripts/generate-sitemap.mjs index 744ee296c..a96aa871b 100644 --- a/scripts/generate-sitemap.mjs +++ b/scripts/generate-sitemap.mjs @@ -1,65 +1,80 @@ import fs from 'fs'; import path from 'path'; import { fileURLToPath } from 'url'; +import { + getEpisodes, +} from '../src/data/podcast'; +import { getNewsletter } from '../src/data/newsletters'; + const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); -function sitemap() { - return [ - { - url: 'https://virtualcoffee.io', - lastModified: new Date(), - changeFrequency: 'yearly', - priority: 1, - }, - { - url: 'https://virtualcoffee.io/about', - lastModified: new Date(), - changeFrequency: 'monthly', - priority: 0.8, - }, - { - url: 'https://virtualcoffee.io/events', - lastModified: new Date(), - changeFrequency: 'weekly', - priority: 0.6, - }, - { - url: 'https://virtualcoffee.io/podcast', - lastModified: new Date(), - changeFrequency: 'monthly', - priority: 0.7, - }, - { - url: 'https://virtualcoffee.io/contact', - lastModified: new Date(), - changeFrequency: 'yearly', - priority: 0.4, - }, - ]; +async function generateStaticParams() { + const newsletters = await getNewsletter(); + const podcasts = await getEpisodes(); + + + const newsletterUrls = newsletters.map(newsletter => ({ + href: newsletter.href, + lastModified: newsletter.lastModified, + })); + const podcastUrls = podcasts.map(podcast => ({ + href: podcast.href, + lastModified: podcast.lastModified, // Ensure you have this field in your data + })); + + return { + newsletters: newsletterUrls, + podcasts: podcastUrls, + }; +} + +async function sitemap() { + const newsletters = await generateStaticParams(); + + const newsletterUrls = newsletters.map(newsletter => ({ + url: `https://virtualcoffee.io/newsletter/issues/${newsletter.href.replace('/newsletter/issues/', '')}`, + lastModified: new Date(newsletter.lastModified), + changeFrequency: 'monthly', + priority: 0.7, + })); + + return [ + { + url: 'https://virtualcoffee.io', + lastModified: new Date(), + changeFrequency: 'yearly', + priority: 1, + }, + { + url: 'https://virtualcoffee.io/about', + lastModified: new Date(), + changeFrequency: 'monthly', + priority: 0.8, + }, + ...newsletterUrls, + ]; } -console.log('Generating sitemap...'); +(async () => { + console.log('Generating sitemap...'); -const sitemapContent = sitemap() - .map( - (entry) => ` - - ${entry.url} - ${entry.lastModified.toISOString()} - ${entry.changeFrequency} - ${entry.priority} - -`, - ) - .join(''); + const sitemapContent = (await sitemap()).map(entry => ` + + ${entry.url} + ${entry.lastModified.toISOString()} + ${entry.changeFrequency} + ${entry.priority} + + `).join(''); -const sitemapXml = ` - - ${sitemapContent} -`; + const sitemapXml = ` + + ${sitemapContent} + `; -const outputPath = path.join(__dirname, '../public/sitemap.xml'); -fs.writeFileSync(outputPath, sitemapXml, 'utf8'); -console.log(`Sitemap generated successfully at ${outputPath}`); + const outputPath = path.join(__dirname, '../public/sitemap.xml'); + fs.writeFileSync(outputPath, sitemapXml, 'utf8'); + console.log(`Sitemap generated successfully at ${outputPath}`); +})(); \ No newline at end of file From 0d23c87689abd2ffc109ae1b61dce3fc9d254065 Mon Sep 17 00:00:00 2001 From: manya706 Date: Sat, 12 Oct 2024 19:01:27 +0000 Subject: [PATCH 11/16] Prettified Code! --- scripts/generate-sitemap.mjs | 98 ++++++++++++++++++------------------ 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/scripts/generate-sitemap.mjs b/scripts/generate-sitemap.mjs index a96aa871b..071c163e2 100644 --- a/scripts/generate-sitemap.mjs +++ b/scripts/generate-sitemap.mjs @@ -1,80 +1,80 @@ import fs from 'fs'; import path from 'path'; import { fileURLToPath } from 'url'; -import { - getEpisodes, -} from '../src/data/podcast'; +import { getEpisodes } from '../src/data/podcast'; import { getNewsletter } from '../src/data/newsletters'; - const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); async function generateStaticParams() { - const newsletters = await getNewsletter(); - const podcasts = await getEpisodes(); + const newsletters = await getNewsletter(); + const podcasts = await getEpisodes(); - - const newsletterUrls = newsletters.map(newsletter => ({ - href: newsletter.href, - lastModified: newsletter.lastModified, - })); - const podcastUrls = podcasts.map(podcast => ({ - href: podcast.href, - lastModified: podcast.lastModified, // Ensure you have this field in your data - })); + const newsletterUrls = newsletters.map((newsletter) => ({ + href: newsletter.href, + lastModified: newsletter.lastModified, + })); + const podcastUrls = podcasts.map((podcast) => ({ + href: podcast.href, + lastModified: podcast.lastModified, // Ensure you have this field in your data + })); - return { - newsletters: newsletterUrls, - podcasts: podcastUrls, - }; + return { + newsletters: newsletterUrls, + podcasts: podcastUrls, + }; } async function sitemap() { - const newsletters = await generateStaticParams(); + const newsletters = await generateStaticParams(); - const newsletterUrls = newsletters.map(newsletter => ({ - url: `https://virtualcoffee.io/newsletter/issues/${newsletter.href.replace('/newsletter/issues/', '')}`, - lastModified: new Date(newsletter.lastModified), - changeFrequency: 'monthly', - priority: 0.7, - })); + const newsletterUrls = newsletters.map((newsletter) => ({ + url: `https://virtualcoffee.io/newsletter/issues/${newsletter.href.replace('/newsletter/issues/', '')}`, + lastModified: new Date(newsletter.lastModified), + changeFrequency: 'monthly', + priority: 0.7, + })); - return [ - { - url: 'https://virtualcoffee.io', - lastModified: new Date(), - changeFrequency: 'yearly', - priority: 1, - }, - { - url: 'https://virtualcoffee.io/about', - lastModified: new Date(), - changeFrequency: 'monthly', - priority: 0.8, - }, - ...newsletterUrls, - ]; + return [ + { + url: 'https://virtualcoffee.io', + lastModified: new Date(), + changeFrequency: 'yearly', + priority: 1, + }, + { + url: 'https://virtualcoffee.io/about', + lastModified: new Date(), + changeFrequency: 'monthly', + priority: 0.8, + }, + ...newsletterUrls, + ]; } (async () => { - console.log('Generating sitemap...'); + console.log('Generating sitemap...'); - const sitemapContent = (await sitemap()).map(entry => ` + const sitemapContent = (await sitemap()) + .map( + (entry) => ` ${entry.url} ${entry.lastModified.toISOString()} ${entry.changeFrequency} ${entry.priority} - `).join(''); + `, + ) + .join(''); - const sitemapXml = ` + const sitemapXml = ` ${sitemapContent} `; - const outputPath = path.join(__dirname, '../public/sitemap.xml'); - fs.writeFileSync(outputPath, sitemapXml, 'utf8'); - console.log(`Sitemap generated successfully at ${outputPath}`); -})(); \ No newline at end of file + const outputPath = path.join(__dirname, '../public/sitemap.xml'); + fs.writeFileSync(outputPath, sitemapXml, 'utf8'); + console.log(`Sitemap generated successfully at ${outputPath}`); +})(); From 44c2a110316dadebfa76ef02b3c6b8eb74381079 Mon Sep 17 00:00:00 2001 From: manya706 Date: Sun, 13 Oct 2024 10:36:31 +0530 Subject: [PATCH 12/16] Added resources, join, store --- scripts/generate-sitemap.mjs | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/scripts/generate-sitemap.mjs b/scripts/generate-sitemap.mjs index 071c163e2..0c99826d0 100644 --- a/scripts/generate-sitemap.mjs +++ b/scripts/generate-sitemap.mjs @@ -3,6 +3,7 @@ import path from 'path'; import { fileURLToPath } from 'url'; import { getEpisodes } from '../src/data/podcast'; import { getNewsletter } from '../src/data/newsletters'; +import { url } from 'inspector'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); @@ -13,11 +14,11 @@ async function generateStaticParams() { const newsletterUrls = newsletters.map((newsletter) => ({ href: newsletter.href, - lastModified: newsletter.lastModified, + lastModified: new Date(newsletter.date), })); const podcastUrls = podcasts.map((podcast) => ({ href: podcast.href, - lastModified: podcast.lastModified, // Ensure you have this field in your data + lastModified: new Date(podcast.date), })); return { @@ -49,7 +50,32 @@ async function sitemap() { changeFrequency: 'monthly', priority: 0.8, }, + { + url: 'https://virtualcoffee.io/resources', + lastModified: new Date(), + changeFrequency: 'monthly', + priority: 0.8, + }, + { + url: 'https://virtualcoffee.io/resources/virtual-coffee-handbook/join-virtual-coffee', + lastModified: new Date(), + changeFrequency: 'yearly', + priority: 0.6, + }, + { + url: 'https://store.virtualcoffee.io/', + lastModified: new Date(), + changeFrequency: 'monthly', + priority: 0.8, + }, + { + url: 'https://store.virtualcoffee.io/collections/all', + lastModified: new Date(), + changeFrequency: 'monthly', + priority: 0.8, + }, ...newsletterUrls, + ...podcastUrls ]; } From 9d83287692c7409dd23a1d8aabb27a5d359a7412 Mon Sep 17 00:00:00 2001 From: manya706 Date: Sun, 13 Oct 2024 05:07:04 +0000 Subject: [PATCH 13/16] Prettified Code! --- scripts/generate-sitemap.mjs | 52 ++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/scripts/generate-sitemap.mjs b/scripts/generate-sitemap.mjs index 0c99826d0..1969a7c73 100644 --- a/scripts/generate-sitemap.mjs +++ b/scripts/generate-sitemap.mjs @@ -18,7 +18,7 @@ async function generateStaticParams() { })); const podcastUrls = podcasts.map((podcast) => ({ href: podcast.href, - lastModified: new Date(podcast.date), + lastModified: new Date(podcast.date), })); return { @@ -50,32 +50,32 @@ async function sitemap() { changeFrequency: 'monthly', priority: 0.8, }, - { - url: 'https://virtualcoffee.io/resources', - lastModified: new Date(), - changeFrequency: 'monthly', - priority: 0.8, - }, - { - url: 'https://virtualcoffee.io/resources/virtual-coffee-handbook/join-virtual-coffee', - lastModified: new Date(), - changeFrequency: 'yearly', - priority: 0.6, - }, - { - url: 'https://store.virtualcoffee.io/', - lastModified: new Date(), - changeFrequency: 'monthly', - priority: 0.8, - }, - { - url: 'https://store.virtualcoffee.io/collections/all', - lastModified: new Date(), - changeFrequency: 'monthly', - priority: 0.8, - }, + { + url: 'https://virtualcoffee.io/resources', + lastModified: new Date(), + changeFrequency: 'monthly', + priority: 0.8, + }, + { + url: 'https://virtualcoffee.io/resources/virtual-coffee-handbook/join-virtual-coffee', + lastModified: new Date(), + changeFrequency: 'yearly', + priority: 0.6, + }, + { + url: 'https://store.virtualcoffee.io/', + lastModified: new Date(), + changeFrequency: 'monthly', + priority: 0.8, + }, + { + url: 'https://store.virtualcoffee.io/collections/all', + lastModified: new Date(), + changeFrequency: 'monthly', + priority: 0.8, + }, ...newsletterUrls, - ...podcastUrls + ...podcastUrls, ]; } From d2c2d6fbfdfcf0a0bb0c1fa87604424e39dcec10 Mon Sep 17 00:00:00 2001 From: manya706 Date: Sun, 13 Oct 2024 10:37:40 +0530 Subject: [PATCH 14/16] added contact --- scripts/generate-sitemap.mjs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/generate-sitemap.mjs b/scripts/generate-sitemap.mjs index 0c99826d0..760d22375 100644 --- a/scripts/generate-sitemap.mjs +++ b/scripts/generate-sitemap.mjs @@ -73,6 +73,12 @@ async function sitemap() { lastModified: new Date(), changeFrequency: 'monthly', priority: 0.8, + }, + { + url: 'https://store.virtualcoffee.io/pages/contact', + lastModified: new Date(), + changeFrequency: 'yearly', + priority: 0.8, }, ...newsletterUrls, ...podcastUrls From 486ea6a3cd4bb6ec945f4c4f5329a89787487ff5 Mon Sep 17 00:00:00 2001 From: manya706 Date: Sun, 13 Oct 2024 05:10:27 +0000 Subject: [PATCH 15/16] Prettified Code! --- scripts/generate-sitemap.mjs | 60 ++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/scripts/generate-sitemap.mjs b/scripts/generate-sitemap.mjs index 91778692d..4b930dc2a 100644 --- a/scripts/generate-sitemap.mjs +++ b/scripts/generate-sitemap.mjs @@ -50,36 +50,36 @@ async function sitemap() { changeFrequency: 'monthly', priority: 0.8, }, - { - url: 'https://virtualcoffee.io/resources', - lastModified: new Date(), - changeFrequency: 'monthly', - priority: 0.8, - }, - { - url: 'https://virtualcoffee.io/resources/virtual-coffee-handbook/join-virtual-coffee', - lastModified: new Date(), - changeFrequency: 'yearly', - priority: 0.6, - }, - { - url: 'https://store.virtualcoffee.io/', - lastModified: new Date(), - changeFrequency: 'monthly', - priority: 0.8, - }, - { - url: 'https://store.virtualcoffee.io/collections/all', - lastModified: new Date(), - changeFrequency: 'monthly', - priority: 0.8, - }, - { - url: 'https://store.virtualcoffee.io/pages/contact', - lastModified: new Date(), - changeFrequency: 'yearly', - priority: 0.8, - }, + { + url: 'https://virtualcoffee.io/resources', + lastModified: new Date(), + changeFrequency: 'monthly', + priority: 0.8, + }, + { + url: 'https://virtualcoffee.io/resources/virtual-coffee-handbook/join-virtual-coffee', + lastModified: new Date(), + changeFrequency: 'yearly', + priority: 0.6, + }, + { + url: 'https://store.virtualcoffee.io/', + lastModified: new Date(), + changeFrequency: 'monthly', + priority: 0.8, + }, + { + url: 'https://store.virtualcoffee.io/collections/all', + lastModified: new Date(), + changeFrequency: 'monthly', + priority: 0.8, + }, + { + url: 'https://store.virtualcoffee.io/pages/contact', + lastModified: new Date(), + changeFrequency: 'yearly', + priority: 0.8, + }, { url: 'https://virtualcoffee.io/resources', lastModified: new Date(), From 16fd0417d9671a203c30cefb28d7e958961fc2be Mon Sep 17 00:00:00 2001 From: manya706 Date: Sun, 13 Oct 2024 10:41:24 +0530 Subject: [PATCH 16/16] Refactor sitemap generation script --- scripts/generate-sitemap.mjs | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/scripts/generate-sitemap.mjs b/scripts/generate-sitemap.mjs index 91778692d..718ac9fa9 100644 --- a/scripts/generate-sitemap.mjs +++ b/scripts/generate-sitemap.mjs @@ -50,30 +50,6 @@ async function sitemap() { changeFrequency: 'monthly', priority: 0.8, }, - { - url: 'https://virtualcoffee.io/resources', - lastModified: new Date(), - changeFrequency: 'monthly', - priority: 0.8, - }, - { - url: 'https://virtualcoffee.io/resources/virtual-coffee-handbook/join-virtual-coffee', - lastModified: new Date(), - changeFrequency: 'yearly', - priority: 0.6, - }, - { - url: 'https://store.virtualcoffee.io/', - lastModified: new Date(), - changeFrequency: 'monthly', - priority: 0.8, - }, - { - url: 'https://store.virtualcoffee.io/collections/all', - lastModified: new Date(), - changeFrequency: 'monthly', - priority: 0.8, - }, { url: 'https://store.virtualcoffee.io/pages/contact', lastModified: new Date(),