Skip to content

Commit d8f42d0

Browse files
docs: generate bare nextra workspace (#263)
* docs: generate bare nextra workspace * Add start/serve script * Revert eslintrc changes Co-authored-by: Dhaiwat Pandya <[email protected]>
1 parent 2bcf5bd commit d8f42d0

File tree

13 files changed

+2802
-219
lines changed

13 files changed

+2802
-219
lines changed

docs/.gitignore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# next.js
12+
/.next/
13+
/out/
14+
15+
# production
16+
/build
17+
18+
# misc
19+
.DS_Store
20+
*.pem
21+
22+
# debug
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
27+
# local env files
28+
.env.local
29+
.env.development.local
30+
.env.test.local
31+
.env.production.local
32+
33+
# vercel
34+
.vercel
35+
36+
# typescript
37+
*.tsbuildinfo

docs/README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
2+
3+
## Getting Started
4+
5+
First, run the development server:
6+
7+
```bash
8+
npm run dev
9+
# or
10+
yarn dev
11+
```
12+
13+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
14+
15+
You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.
16+
17+
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.
18+
19+
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
20+
21+
## Learn More
22+
23+
To learn more about Next.js, take a look at the following resources:
24+
25+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
26+
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
27+
28+
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
29+
30+
## Deploy on Vercel
31+
32+
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
33+
34+
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.

docs/next-env.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/// <reference types="next" />
2+
/// <reference types="next/image-types/global" />
3+
4+
// NOTE: This file should not be edited
5+
// see https://nextjs.org/docs/basic-features/typescript for more information.

docs/next.config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
const withNextra = require('nextra')({
2+
theme: 'nextra-theme-docs',
3+
themeConfig: './theme.config.js',
4+
unstable_staticImage: true,
5+
});
6+
7+
/** @type {import('next').NextConfig} */
8+
const nextConfig = {
9+
reactStrictMode: true,
10+
};
11+
12+
module.exports = withNextra(nextConfig);

docs/package.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "docs",
3+
"private": true,
4+
"version": "0.0.0",
5+
"scripts": {
6+
"dev": "next dev",
7+
"build": "next build",
8+
"start": "next start"
9+
},
10+
"dependencies": {
11+
"next": "12.0.8",
12+
"nextra": "^1.1.0",
13+
"nextra-theme-docs": "^1.2.6",
14+
"react": "17.0.2",
15+
"react-dom": "17.0.2"
16+
},
17+
"devDependencies": {
18+
"@types/node": "17.0.12",
19+
"@types/react": "17.0.38",
20+
"eslint": "8.7.0",
21+
"eslint-config-next": "12.0.8",
22+
"typescript": "4.5.5"
23+
}
24+
}

docs/pages/_app.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import 'nextra-theme-docs/style.css';
2+
import type { AppProps } from 'next/app';
3+
4+
function MyApp({ Component, pageProps }: AppProps) {
5+
return <Component {...pageProps} />;
6+
}
7+
8+
export default MyApp;

docs/pages/index.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: 'web3-ui docs'
3+
---
4+
5+
# `web3-ui`
6+
7+
```tsx
8+
const Component = () => {
9+
return <div>Hello World</div>;
10+
};
11+
```

docs/public/favicon.ico

25.3 KB
Binary file not shown.

docs/public/vercel.svg

Lines changed: 4 additions & 0 deletions
Loading

docs/theme.config.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
export default {
2+
projectLink: 'https://github.com/developer-dao/web3-ui', // GitHub link in the navbar
3+
docsRepositoryBase: 'https://github.com/Developer-DAO/web3-ui/tree/main/docs', // base URL for the docs repository
4+
nextLinks: true,
5+
prevLinks: true,
6+
search: true,
7+
customSearch: null, // customizable, you can use algolia for example
8+
darkMode: true,
9+
footer: true,
10+
footerText: `MIT ${new Date().getFullYear()} © Developer DAO`,
11+
footerEditLink: `Edit this page on GitHub`,
12+
logo: (
13+
<>
14+
<span>web3-ui</span>
15+
</>
16+
),
17+
head: (
18+
<>
19+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
20+
<meta
21+
name="description"
22+
content="web3-ui: a library of UI components specifically crafted for web3 use cases"
23+
/>
24+
<meta
25+
name="og:title"
26+
content="web3-ui: a library of UI components specifically crafted for web3 use cases"
27+
/>
28+
</>
29+
),
30+
};

0 commit comments

Comments
 (0)