Skip to content

Commit

Permalink
Add sitemap
Browse files Browse the repository at this point in the history
  • Loading branch information
YuheiNakasaka committed Feb 7, 2024
1 parent 5e172ee commit 1cae363
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ yarn-error.log*

.env*

.hono
/static/index.html
/static/articles
/static/feed.xml
/static/feed.xml
/static/robots.txt
/static/sitemap.xml
8 changes: 8 additions & 0 deletions build.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
import { toSSG } from "hono/bun";
import { generateSitemap } from "sitemap-ts";
import app from "./src/index";

toSSG(app);

const hostname = process.env.VITE_GIALOG_BASE_URL;
generateSitemap({
outDir: "./static",
readable: true,
hostname,
});
Binary file modified bun.lockb
Binary file not shown.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"remark-parse": "^11.0.0",
"remark-rehype": "^11.1.0",
"rss": "^1.2.2",
"sitemap-ts": "^1.6.1",
"vite": "^5.0.12",
"vite-plugin-xml-loader": "^1.0.2"
}
Expand Down

0 comments on commit 1cae363

Please sign in to comment.