Skip to content

Commit 5223385

Browse files
committed
fix: plugins
1 parent 74a235f commit 5223385

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

website/vite.config.ts

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,25 @@ const publicAssetsDocsPath = resolve(__dirname, "./public/assets/");
1616
rmSync(publicAssetsDocsPath, { recursive: true, force: true });
1717
symlinkSync(assetsDocsPath, publicAssetsDocsPath, "dir");
1818

19-
export default defineConfig({
20-
base: basePath,
21-
plugins: [
22-
tailwindcss(),
23-
ssg({
24-
plugins: [
19+
const ssgPlugins =
20+
(basePath as string) === "/"
21+
? [
2522
sitemapPlugin({
2623
baseUrl: "https://typst-jp.github.io/",
2724
}),
2825
robotsTxtPlugin({
2926
rules: [{ userAgent: "*", allow: ["/"] }],
3027
sitemapUrl: "https://typst-jp.github.io/sitemap.xml",
3128
}),
32-
],
29+
]
30+
: [];
31+
32+
export default defineConfig({
33+
base: basePath,
34+
plugins: [
35+
tailwindcss(),
36+
ssg({
37+
plugins: ssgPlugins,
3338
}),
3439
devServer({
3540
entry: "src/index.tsx",

0 commit comments

Comments
 (0)