From 2937c81a8c8c8130f43a429dfc7b2d235af4f69c Mon Sep 17 00:00:00 2001 From: Nate Moore Date: Mon, 22 Nov 2021 05:30:41 -0500 Subject: [PATCH] spike: experiment with automatic sitemap generation --- .../src/components/Nav.astro | 2 + packages/astro/src/core/create-vite.ts | 2 + packages/astro/src/runtime/server/index.ts | 4 ++ .../astro/src/vite-plugin-sitemap/README.md | 3 ++ .../astro/src/vite-plugin-sitemap/index.ts | 39 +++++++++++++++++++ 5 files changed, 50 insertions(+) create mode 100644 packages/astro/src/vite-plugin-sitemap/README.md create mode 100644 packages/astro/src/vite-plugin-sitemap/index.ts diff --git a/examples/blog-multiple-authors/src/components/Nav.astro b/examples/blog-multiple-authors/src/components/Nav.astro index 04a537f87..08f6fabc6 100644 --- a/examples/blog-multiple-authors/src/components/Nav.astro +++ b/examples/blog-multiple-authors/src/components/Nav.astro @@ -3,6 +3,8 @@ export interface Props { title: string; } const { title } = Astro.props; +const routes = await Astro.generateRouteManifest(); +console.log(routes); ---