We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a43a18 commit 1687d72Copy full SHA for 1687d72
website/src/index.tsx
@@ -1,4 +1,5 @@
1
import { Hono } from "hono";
2
+import { appendTrailingSlash, trimTrailingSlash } from 'hono/trailing-slash'
3
import {
4
CategoryTemplate,
5
HtmlTemplate,
@@ -18,6 +19,12 @@ const docs = docsJson as unknown as Page[];
18
19
const [flattenedPages, pagePaths] = flattenDocs(docs);
20
21
const app = new Hono();
22
+app.use(appendTrailingSlash())
23
+app.use(trimTrailingSlash())
24
+app.get("/", (c) => {
25
+ return c.redirect("/docs");
26
+}
27
+);
28
29
flattenedPages.forEach((page, pageIndex) => {
30
const path = pagePaths[pageIndex];
0 commit comments