From 9f4757903332b742e83f33055ac594aecca93642 Mon Sep 17 00:00:00 2001 From: Igor Kamyshev Date: Mon, 15 Apr 2024 13:00:54 +0700 Subject: [PATCH] Sitemap --- apps/website/docs/.vitepress/config.js | 7 ++++++- apps/website/docs/.vitepress/rss.js | 4 +--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/website/docs/.vitepress/config.js b/apps/website/docs/.vitepress/config.js index 72bf0938..92016af4 100644 --- a/apps/website/docs/.vitepress/config.js +++ b/apps/website/docs/.vitepress/config.js @@ -2,9 +2,14 @@ import { defineConfig } from 'vitepress'; import { createSidebar } from './sidebar_creator'; import { rss } from './rss'; +const HOSTNAME = 'https://withease.pages.dev'; + export default defineConfig({ async buildEnd(config) { - await rss.onBuildEnd(config); + await rss.onBuildEnd(config, { hostname: HOSTNAME }); + }, + sitemap: { + hostname: HOSTNAME, }, lang: 'en', title: 'With Ease', diff --git a/apps/website/docs/.vitepress/rss.js b/apps/website/docs/.vitepress/rss.js index 4f9d8f35..167901b6 100644 --- a/apps/website/docs/.vitepress/rss.js +++ b/apps/website/docs/.vitepress/rss.js @@ -5,9 +5,7 @@ import { createContentLoader } from 'vitepress'; import { compareAsc } from 'date-fns'; export const rss = { - async onBuildEnd(config) { - const hostname = 'https://withease.pages.dev'; - + async onBuildEnd(config, { hostname }) { const feed = new Feed({ title: 'With Ease Magazine', description: