-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
168 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.next | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.counter { | ||
border: 1px solid #ccc; | ||
border-radius: 5px; | ||
padding: 2px 6px; | ||
margin: 12px 0 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Example from https://beta.reactjs.org/learn | ||
|
||
import { useState } from 'react' | ||
import styles from './counters.module.css' | ||
|
||
function MyButton() { | ||
const [count, setCount] = useState(0) | ||
|
||
function handleClick() { | ||
setCount(count + 1) | ||
} | ||
|
||
return ( | ||
<div> | ||
<button onClick={handleClick} className={styles.counter}> | ||
Clicked {count} times | ||
</button> | ||
</div> | ||
) | ||
} | ||
|
||
export default function MyApp() { | ||
return <MyButton /> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/image-types/global" /> | ||
|
||
// NOTE: This file should not be edited | ||
// see https://nextjs.org/docs/basic-features/typescript for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const withNextra = require('nextra')({ | ||
theme: 'nextra-theme-docs', | ||
themeConfig: './theme.config.tsx', | ||
}) | ||
|
||
module.exports = withNextra() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "docs", | ||
"version": "0.0.1", | ||
"description": "docs", | ||
"scripts": { | ||
"dev": "next dev", | ||
"build": "next build", | ||
"start": "next start" | ||
}, | ||
"dependencies": { | ||
"next": "^13.0.6", | ||
"nextra": "latest", | ||
"nextra-theme-docs": "latest", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "18.11.10", | ||
"typescript": "^4.9.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"index": "Introduction", | ||
"another": "Another Page", | ||
"advanced": "Advanced (A Folder)", | ||
"about": { | ||
"title": "About", | ||
"type": "page" | ||
}, | ||
"contact": { | ||
"title": "Contact ↗", | ||
"type": "page", | ||
"href": "https://twitter.com/shuding_", | ||
"newWindow": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# About | ||
|
||
This is the about page! This page is shown on the navbar. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Advanced | ||
|
||
This is the index page for the Advanced folder! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Satori | ||
|
||
Satori (悟り) is a Japanese Buddhist term for awakening, "comprehension; understanding". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Another Page | ||
|
||
```js filename="demo.js" {3} copy | ||
let a = 1; | ||
|
||
console.log(a); | ||
``` | ||
|
||
## Component | ||
|
||
import { useState } from 'react' | ||
|
||
{/* Import CSS modules */} | ||
import styles from '../components/counters.module.css' | ||
|
||
export const Counter = () => { | ||
const [count, setCount] = useState(0); | ||
return ( | ||
<div> | ||
<button onClick={() => setCount(count + 1)} className={styles.counter}>Clicked {count} times</button> | ||
</div> | ||
); | ||
}; | ||
|
||
<Counter/> | ||
|
||
## External Component | ||
|
||
import Counters from '../components/counters' | ||
|
||
<Counters /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Introduction | ||
|
||
Welcome to Nextra! This is a basic docs template. You can use it as a starting point for your own project :) | ||
|
||
## What is Nextra? | ||
|
||
A **simple**, **powerful** and **flexible** site generation framework with everything you love from Next.js. | ||
|
||
## Documentation | ||
|
||
The documentation is available at [https://nextra.site](https://nextra.site). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React from 'react' | ||
import { DocsThemeConfig } from 'nextra-theme-docs' | ||
|
||
const config: DocsThemeConfig = { | ||
logo: <span>My Project</span>, | ||
project: { | ||
link: 'https://github.com/shuding/nextra-docs-template', | ||
}, | ||
chat: { | ||
link: 'https://discord.com', | ||
}, | ||
docsRepositoryBase: 'https://github.com/shuding/nextra-docs-template', | ||
footer: { | ||
text: 'Nextra Docs Template', | ||
}, | ||
} | ||
|
||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es5", | ||
"lib": ["dom", "dom.iterable", "esnext"], | ||
"allowJs": true, | ||
"skipLibCheck": true, | ||
"strict": false, | ||
"forceConsistentCasingInFileNames": true, | ||
"noEmit": true, | ||
"incremental": true, | ||
"esModuleInterop": true, | ||
"module": "esnext", | ||
"moduleResolution": "node", | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"jsx": "preserve" | ||
}, | ||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], | ||
"exclude": ["node_modules"] | ||
} |