Skip to content

Commit 9e40c1a

Browse files
authored
docs : rewrite docs site (#256)
* rewrite docs site using nextra * updated docs * updated readme * add a common issue about sentry and api route
1 parent 1ce30f6 commit 9e40c1a

35 files changed

+3713
-1759
lines changed

README.md

Lines changed: 5 additions & 753 deletions
Large diffs are not rendered by default.

docs/components/Footer.tsx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { SITE } from "../config";
2+
import styles from "../styles/Layout.module.css";
3+
4+
export default function Footer() {
5+
return (
6+
<footer className={styles.footer}>
7+
<span>
8+
Maintained by{" "}
9+
<a target="_blank" href={SITE.sst} rel="noopener noreferrer">
10+
SST
11+
</a>
12+
</span>
13+
<div>
14+
<a target="_blank" href={SITE.github} rel="noopener noreferrer">
15+
GitHub
16+
</a>
17+
<a target="_blank" href={SITE.discord} rel="noopener noreferrer">
18+
Discord
19+
</a>
20+
<a target="_blank" href={SITE.twitter} rel="noopener noreferrer">
21+
Twitter
22+
</a>
23+
</div>
24+
</footer>
25+
);
26+
}

docs/components/Layout.tsx

Lines changed: 0 additions & 47 deletions
This file was deleted.

docs/next.config.js

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/** @type {import('next').NextConfig} */
22

3-
let basePath = undefined;
4-
let assetPrefix = undefined;
3+
// let basePath = undefined;
4+
// let assetPrefix = undefined;
55

66
///** Deploys as a directory through GitHub Actions **/
77
//const isGithubActions = process.env.GITHUB_ACTIONS || false
@@ -15,16 +15,26 @@ let assetPrefix = undefined;
1515
//}
1616
///** End GitHub Actions case **/
1717

18-
const nextConfig = {
19-
images: {
20-
unoptimized: true,
21-
},
18+
// const nextConfig = {
19+
// images: {
20+
// unoptimized: true,
21+
// },
2222

23-
swcMinify: true,
24-
reactStrictMode: true,
23+
// swcMinify: true,
24+
// reactStrictMode: true,
25+
26+
// basePath: basePath,
27+
// assetPrefix: assetPrefix,
28+
// };
2529

26-
basePath: basePath,
27-
assetPrefix: assetPrefix,
28-
};
30+
const withNextra = require("nextra")({
31+
theme: "nextra-theme-docs",
32+
themeConfig: "./theme.config.jsx",
33+
});
2934

30-
module.exports = nextConfig;
35+
module.exports = withNextra({
36+
swcMinify: true,
37+
images: {
38+
unoptimized: true,
39+
},
40+
});

docs/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
"@types/react": "18.0.25",
1414
"@types/react-dom": "18.0.9",
1515
"next": "13.4.12",
16+
"nextra": "^2.13.1",
17+
"nextra-theme-docs": "^2.13.1",
1618
"react": "18.2.0",
1719
"react-dom": "18.2.0",
1820
"typescript": "4.9.3"

docs/pages/404.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## Page not found
2+
3+
The page you are looking for does not exist. You can go back to the [homepage](/).

docs/pages/404.tsx

Lines changed: 0 additions & 19 deletions
This file was deleted.

docs/pages/_app.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default function App({ Component, pageProps }) {
2+
return <Component {...pageProps} />
3+
}

docs/pages/_app.tsx

Lines changed: 0 additions & 25 deletions
This file was deleted.

docs/pages/_meta.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"index": "Home",
3+
"get_started": "Getting started",
4+
"common_issues": "Common issues",
5+
"inner_workings": "How does it work?",
6+
"advanced": "Advanced",
7+
"faq": "FAQ"
8+
}

0 commit comments

Comments
 (0)