Skip to content

Commit aefc075

Browse files
committedJun 8, 2023
Initial commit
Created from https://vercel.com/new
0 parents  commit aefc075

18 files changed

+2394
-0
lines changed
 

‎.github/screenshot.png

868 KB
Loading

‎.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.next
2+
node_modules

‎LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 Shu Ding
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

‎README.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Nextra Docs Template
2+
3+
This is a template for creating documentation with [Nextra](https://nextra.site).
4+
5+
[**Live Demo →**](https://nextra-docs-template.vercel.app)
6+
7+
[![](.github/screenshot.png)](https://nextra-docs-template.vercel.app)
8+
9+
## Quick Start
10+
11+
Click the button to clone this repository and deploy it on Vercel:
12+
13+
[![](https://vercel.com/button)](https://vercel.com/new/clone?s=https%3A%2F%2Fgithub.com%2Fshuding%2Fnextra-docs-template&showOptionalTeamCreation=false)
14+
15+
## Local Development
16+
17+
First, run `pnpm i` to install the dependencies.
18+
19+
Then, run `pnpm dev` to start the development server and visit localhost:3000.
20+
21+
## License
22+
23+
This project is licensed under the MIT License.

‎components/counters.module.css

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.counter {
2+
border: 1px solid #ccc;
3+
border-radius: 5px;
4+
padding: 2px 6px;
5+
margin: 12px 0 0;
6+
}

‎components/counters.tsx

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Example from https://beta.reactjs.org/learn
2+
3+
import { useState } from 'react'
4+
import styles from './counters.module.css'
5+
6+
function MyButton() {
7+
const [count, setCount] = useState(0)
8+
9+
function handleClick() {
10+
setCount(count + 1)
11+
}
12+
13+
return (
14+
<div>
15+
<button onClick={handleClick} className={styles.counter}>
16+
Clicked {count} times
17+
</button>
18+
</div>
19+
)
20+
}
21+
22+
export default function MyApp() {
23+
return <MyButton />
24+
}

‎next-env.d.ts

+5
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.

‎next.config.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
const withNextra = require('nextra')({
2+
theme: 'nextra-theme-docs',
3+
themeConfig: './theme.config.tsx',
4+
})
5+
6+
module.exports = withNextra()

‎package.json

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"name": "nextra-docs-template",
3+
"version": "0.0.1",
4+
"description": "Nextra docs template",
5+
"scripts": {
6+
"dev": "next dev",
7+
"build": "next build",
8+
"start": "next start"
9+
},
10+
"repository": {
11+
"type": "git",
12+
"url": "git+https://github.com/shuding/nextra-docs-template.git"
13+
},
14+
"author": "Shu Ding <g@shud.in>",
15+
"license": "MIT",
16+
"bugs": {
17+
"url": "https://github.com/shuding/nextra-docs-template/issues"
18+
},
19+
"homepage": "https://github.com/shuding/nextra-docs-template#readme",
20+
"dependencies": {
21+
"next": "^13.0.6",
22+
"nextra": "latest",
23+
"nextra-theme-docs": "latest",
24+
"react": "^18.2.0",
25+
"react-dom": "^18.2.0"
26+
},
27+
"devDependencies": {
28+
"@types/node": "18.11.10",
29+
"typescript": "^4.9.3"
30+
}
31+
}

‎pages/_meta.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"index": "Introduction",
3+
"another": "Another Page",
4+
"advanced": "Advanced (A Folder)",
5+
"about": {
6+
"title": "About",
7+
"type": "page"
8+
},
9+
"contact": {
10+
"title": "Contact ↗",
11+
"type": "page",
12+
"href": "https://twitter.com/shuding_",
13+
"newWindow": true
14+
}
15+
}

‎pages/about.mdx

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# About
2+
3+
This is the about page! This page is shown on the navbar.

‎pages/advanced.mdx

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Advanced
2+
3+
This is the index page for the Advanced folder!

‎pages/advanced/satori.mdx

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Satori
2+
3+
Satori (悟り) is a Japanese Buddhist term for awakening, "comprehension; understanding".

‎pages/another.mdx

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Another Page
2+
3+
```js filename="demo.js" {3} copy
4+
let a = 1;
5+
6+
console.log(a);
7+
```
8+
9+
## Component
10+
11+
import { useState } from 'react'
12+
13+
{/* Import CSS modules */}
14+
import styles from '../components/counters.module.css'
15+
16+
export const Counter = () => {
17+
const [count, setCount] = useState(0);
18+
return (
19+
<div>
20+
<button onClick={() => setCount(count + 1)} className={styles.counter}>Clicked {count} times</button>
21+
</div>
22+
);
23+
};
24+
25+
<Counter/>
26+
27+
## External Component
28+
29+
import Counters from '../components/counters'
30+
31+
<Counters />

‎pages/index.mdx

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Introduction
2+
3+
Welcome to Nextra! This is a basic docs template. You can use it as a starting point for your own project :)
4+
5+
## What is Nextra?
6+
7+
A **simple**, **powerful** and **flexible** site generation framework with everything you love from Next.js.
8+
9+
## Documentation
10+
11+
The documentation is available at [https://nextra.site](https://nextra.site).

‎pnpm-lock.yaml

+2,172
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎theme.config.tsx

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import React from 'react'
2+
import { DocsThemeConfig } from 'nextra-theme-docs'
3+
4+
const config: DocsThemeConfig = {
5+
logo: <span>My Project</span>,
6+
project: {
7+
link: 'https://github.com/shuding/nextra-docs-template',
8+
},
9+
chat: {
10+
link: 'https://discord.com',
11+
},
12+
docsRepositoryBase: 'https://github.com/shuding/nextra-docs-template',
13+
footer: {
14+
text: 'Nextra Docs Template',
15+
},
16+
}
17+
18+
export default config

‎tsconfig.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"compilerOptions": {
3+
"target": "es5",
4+
"lib": ["dom", "dom.iterable", "esnext"],
5+
"allowJs": true,
6+
"skipLibCheck": true,
7+
"strict": false,
8+
"forceConsistentCasingInFileNames": true,
9+
"noEmit": true,
10+
"incremental": true,
11+
"esModuleInterop": true,
12+
"module": "esnext",
13+
"moduleResolution": "node",
14+
"resolveJsonModule": true,
15+
"isolatedModules": true,
16+
"jsx": "preserve"
17+
},
18+
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
19+
"exclude": ["node_modules"]
20+
}

1 commit comments

Comments
 (1)

vercel[bot] commented on Jun 8, 2023

@vercel[bot]
Please sign in to comment.