-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c0be8e6
commit 5520cbf
Showing
2 changed files
with
20 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"><url><loc>https://codybontecou.com/an-introduction-to-meta-tags-a11y-and-seo.html</loc></url><url><loc>https://codybontecou.com/automate-with-zapier.html</loc></url><url><loc>https://codybontecou.com/contact.html</loc></url><url><loc>https://codybontecou.com/continuous-learning-by-continuous-confusion-in-tech.html</loc></url><url><loc>https://codybontecou.com/convert-reactjs-component-to-vuejs.html</loc></url><url><loc>https://codybontecou.com/cypress-component-testing-with-nuxt-3.html</loc></url><url><loc>https://codybontecou.com/disable-video-recording-on-cypress-run.html</loc></url><url><loc>https://codybontecou.com/dopamine-fasting-with-100-days-of-code.html</loc></url><url><loc>https://codybontecou.com/electron-app-with-vue-devtools.html</loc></url><url><loc>https://codybontecou.com/electron-app-with-vuejs-and-vite.html</loc></url><url><loc>https://codybontecou.com/generate-twitter-lists-with-python.html</loc></url><url><loc>https://codybontecou.com/generating-a-code-snippet-with-carbon.html</loc></url><url><loc>https://codybontecou.com/getting-youtube-channel-id-using-their-api.html</loc></url><url><loc>https://codybontecou.com/global-state-management-in-an-electron-app.html</loc></url><url><loc>https://codybontecou.com/google-analytics-with-vitepress.html</loc></url><url><loc>https://codybontecou.com/hide-username-on-mac-terminal-prompt.html</loc></url><url><loc>https://codybontecou.com/how-to-use-vuetify-with-nuxt-3.html</loc></url><url><loc>https://codybontecou.com/import-pinia-store-into-other-store.html</loc></url><url><loc>https://codybontecou.com/index.html</loc></url><url><loc>https://codybontecou.com/integrating-nuxt-bridge-with-nuxt2.html</loc></url><url><loc>https://codybontecou.com/lets-setup-nuxt-3-with-cypress.html</loc></url><url><loc>https://codybontecou.com/mocking-api-with-msw-and-typescript.html</loc></url><url><loc>https://codybontecou.com/mocking-http-responses-in-elixir-and-phoenix.html</loc></url><url><loc>https://codybontecou.com/nuxt3-and-pinia.html</loc></url><url><loc>https://codybontecou.com/post-to-reddit-with-nodejs-and-typescript.html</loc></url><url><loc>https://codybontecou.com/programmatically-posting-to-your-favorite-blogs.html</loc></url><url><loc>https://codybontecou.com/programmatically-tweeting-with-nodejs.html</loc></url><url><loc>https://codybontecou.com/reusable-yaml-variables.html</loc></url><url><loc>https://codybontecou.com/selenium-movie-picker.html</loc></url><url><loc>https://codybontecou.com/silently-update-url-nuxt-3.html</loc></url><url><loc>https://codybontecou.com/stripe-integration-in-nuxt-3.html</loc></url><url><loc>https://codybontecou.com/tailwindcss-with-vitepress.html</loc></url><url><loc>https://codybontecou.com/talks.html</loc></url><url><loc>https://codybontecou.com/time-to-read-article-component.html</loc></url><url><loc>https://codybontecou.com/using-url-query-params-in-nuxt-3.html</loc></url><url><loc>https://codybontecou.com/vuejs-emit-multiple-values-from-child-to-parent.html</loc></url><url><loc>https://codybontecou.com/vuepress-styles.html</loc></url><url><loc>https://codybontecou.com/es/foo.html</loc></url><url><loc>https://codybontecou.com/projects/e-sports-ai-app.html</loc></url><url><loc>https://codybontecou.com/projects/index.html</loc></url></urlset> | ||
<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"><url><loc>https://www.codybontecou.com/an-introduction-to-meta-tags-a11y-and-seo.html</loc></url><url><loc>https://www.codybontecou.com/automate-with-zapier.html</loc></url><url><loc>https://www.codybontecou.com/contact.html</loc></url><url><loc>https://www.codybontecou.com/continuous-learning-by-continuous-confusion-in-tech.html</loc></url><url><loc>https://www.codybontecou.com/convert-reactjs-component-to-vuejs.html</loc></url><url><loc>https://www.codybontecou.com/cypress-component-testing-with-nuxt-3.html</loc></url><url><loc>https://www.codybontecou.com/disable-video-recording-on-cypress-run.html</loc></url><url><loc>https://www.codybontecou.com/dopamine-fasting-with-100-days-of-code.html</loc></url><url><loc>https://www.codybontecou.com/electron-app-with-vue-devtools.html</loc></url><url><loc>https://www.codybontecou.com/electron-app-with-vuejs-and-vite.html</loc></url><url><loc>https://www.codybontecou.com/generate-twitter-lists-with-python.html</loc></url><url><loc>https://www.codybontecou.com/generating-a-code-snippet-with-carbon.html</loc></url><url><loc>https://www.codybontecou.com/getting-youtube-channel-id-using-their-api.html</loc></url><url><loc>https://www.codybontecou.com/global-state-management-in-an-electron-app.html</loc></url><url><loc>https://www.codybontecou.com/google-analytics-with-vitepress.html</loc></url><url><loc>https://www.codybontecou.com/hide-username-on-mac-terminal-prompt.html</loc></url><url><loc>https://www.codybontecou.com/how-to-use-vuetify-with-nuxt-3.html</loc></url><url><loc>https://www.codybontecou.com/import-pinia-store-into-other-store.html</loc></url><url><loc>https://www.codybontecou.com/index.html</loc></url><url><loc>https://www.codybontecou.com/integrating-nuxt-bridge-with-nuxt2.html</loc></url><url><loc>https://www.codybontecou.com/lets-setup-nuxt-3-with-cypress.html</loc></url><url><loc>https://www.codybontecou.com/mocking-api-with-msw-and-typescript.html</loc></url><url><loc>https://www.codybontecou.com/mocking-http-responses-in-elixir-and-phoenix.html</loc></url><url><loc>https://www.codybontecou.com/nuxt3-and-pinia.html</loc></url><url><loc>https://www.codybontecou.com/post-to-reddit-with-nodejs-and-typescript.html</loc></url><url><loc>https://www.codybontecou.com/programmatically-posting-to-your-favorite-blogs.html</loc></url><url><loc>https://www.codybontecou.com/programmatically-tweeting-with-nodejs.html</loc></url><url><loc>https://www.codybontecou.com/reusable-yaml-variables.html</loc></url><url><loc>https://www.codybontecou.com/selenium-movie-picker.html</loc></url><url><loc>https://www.codybontecou.com/silently-update-url-nuxt-3.html</loc></url><url><loc>https://www.codybontecou.com/stripe-integration-in-nuxt-3.html</loc></url><url><loc>https://www.codybontecou.com/tailwindcss-with-vitepress.html</loc></url><url><loc>https://www.codybontecou.com/talks.html</loc></url><url><loc>https://www.codybontecou.com/time-to-read-article-component.html</loc></url><url><loc>https://www.codybontecou.com/using-url-query-params-in-nuxt-3.html</loc></url><url><loc>https://www.codybontecou.com/vuejs-emit-multiple-values-from-child-to-parent.html</loc></url><url><loc>https://www.codybontecou.com/vuepress-styles.html</loc></url><url><loc>https://www.codybontecou.com/es/foo.html</loc></url><url><loc>https://www.codybontecou.com/projects/e-sports-ai-app.html</loc></url><url><loc>https://www.codybontecou.com/projects/index.html</loc></url></urlset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
import fs from 'fs'; | ||
import path from 'path'; | ||
import fg from 'fast-glob'; | ||
import { SitemapStream, streamToPromise } from 'sitemap'; | ||
import { fileURLToPath } from 'url'; | ||
import fs from 'fs' | ||
import path from 'path' | ||
import fg from 'fast-glob' | ||
import { SitemapStream, streamToPromise } from 'sitemap' | ||
import { fileURLToPath } from 'url' | ||
|
||
console.log('Start building sitemap..'); | ||
console.log('Start building sitemap..') | ||
|
||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = path.dirname(__filename); | ||
const __filename = fileURLToPath(import.meta.url) | ||
const __dirname = path.dirname(__filename) | ||
|
||
const linksStream = fg | ||
.stream(['**/*.md', '!**/node_modules', '!README.md']) | ||
.map(filePath => ({ | ||
url: filePath.replace('src/', '').replace(/\.md$/, '.html'), | ||
})); | ||
.stream(['**/*.md', '!**/node_modules', '!README.md']) | ||
.map(filePath => ({ | ||
url: filePath.replace('src/', '').replace(/\.md$/, '.html'), | ||
})) | ||
|
||
const sitemapStream = new SitemapStream({ | ||
hostname: 'https://codybontecou.com/', | ||
}); | ||
hostname: 'https://www.codybontecou.com/', | ||
}) | ||
|
||
// Return a promise that resolves with your XML string | ||
streamToPromise(linksStream.pipe(sitemapStream)).then(sitemap => { | ||
fs.writeFileSync( | ||
path.resolve(__dirname, '../src/public/sitemap.xml'), | ||
sitemap | ||
); | ||
}); | ||
fs.writeFileSync( | ||
path.resolve(__dirname, '../src/public/sitemap.xml'), | ||
sitemap | ||
) | ||
}) |