Skip to content

Commit 90364b6

Browse files
authored
Add sitemap.xml and robots.txt dynamically (#14)
1 parent 8046590 commit 90364b6

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

package-lock.json

Lines changed: 8 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"tailwindcss": "^4.1.16",
4242
"tw-animate-css": "^1.4.0",
4343
"typescript": "~5.9.3",
44-
"vite": "^7.1.7"
44+
"vite": "^7.1.7",
45+
"vite-plugin-sitemap": "^0.8.2"
4546
}
4647
}

vite.config.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,18 @@ import tailwindcss from "@tailwindcss/vite";
22
import react from "@vitejs/plugin-react-swc";
33
import path from "path";
44
import { defineConfig } from "vite";
5+
import sitemap from "vite-plugin-sitemap";
56

67
// https://vite.dev/config/
78
export default defineConfig({
8-
plugins: [react(), tailwindcss()],
9+
plugins: [
10+
react(),
11+
tailwindcss(),
12+
sitemap({
13+
hostname: "https://libresplit.org",
14+
dynamicRoutes: ["/converter"],
15+
}),
16+
],
917
resolve: {
1018
alias: {
1119
"@": path.resolve(__dirname, "./src"),

0 commit comments

Comments
 (0)