-
Notifications
You must be signed in to change notification settings - Fork 45
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
11 changed files
with
5,992 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,46 @@ | ||
name: docs | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- docs/** | ||
|
||
defaults: | ||
run: | ||
working-directory: docs | ||
|
||
jobs: | ||
prettier: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14.x | ||
- name: Install Dependencies | ||
run: yarn --frozen-lockfile | ||
- run: yarn -s format:check | ||
|
||
eslint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14.x | ||
- name: Install Dependencies | ||
run: yarn --frozen-lockfile | ||
- run: yarn -s lint:check | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 16.x | ||
- run: yarn --frozen-lockfile | ||
- run: yarn -s build | ||
- run: yarn -s export | ||
- run: gh-pages --dist=out |
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 @@ | ||
out/ |
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/ | ||
out/ |
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 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/types/global" /> | ||
/// <reference types="next/image-types/global" /> |
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,26 @@ | ||
/* eslint-disable */ | ||
|
||
const remarkGfm = require('remark-gfm') | ||
const withNextra = require('nextra') | ||
|
||
module.exports = withNextra('nextra-theme-docs', './theme.config.js')(withRemarkGFM()) | ||
|
||
/** | ||
* Use Remark GFM in MDX Webpack Loader. | ||
* Can be removed once shuding/nextra#184 is released. | ||
* | ||
* @returns {import('next').NextConfig} | ||
* @see https://github.com/shuding/nextra/pull/184/ | ||
*/ | ||
function withRemarkGFM() { | ||
return { | ||
webpack(config, options) { | ||
const markdownRule = config.module.rules.find((rule) => rule.test?.toString() === '/\\.mdx?$/') | ||
const mdxLoaderConfig = markdownRule.use.find(({ loader }) => loader === '@mdx-js/loader') | ||
mdxLoaderConfig.options = { | ||
remarkPlugins: [remarkGfm], | ||
} | ||
return 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,28 @@ | ||
{ | ||
"license": "MIT", | ||
"scripts": { | ||
"dev": "next dev", | ||
"build": "next build", | ||
"export": "next export", | ||
"format": "prettier --write .", | ||
"format:check": "prettier --check .", | ||
"lint": "eslint . --ext .ts,.tsx --fix", | ||
"lint:check": "eslint . --ext .ts,.tsx --max-warnings 0" | ||
}, | ||
"dependencies": { | ||
"next": "^11.0.1", | ||
"nextra": "^0.4.5", | ||
"nextra-theme-docs": "^1.1.7", | ||
"react": "^17.0.2", | ||
"react-dom": "^17.0.2", | ||
"remark-gfm": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "^17.0.14", | ||
"eslint": "^7.30.0", | ||
"eslint-config-next": "^11.0.1", | ||
"gh-pages": "^3.2.3", | ||
"prettier": "^2.3.2", | ||
"typescript": "^4.3.5" | ||
} | ||
} |
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,10 @@ | ||
import { FC } from 'react' | ||
import { AppProps } from 'next/app' | ||
import 'nextra-theme-docs/style.css' | ||
|
||
const App: FC<AppProps> = ({ Component, pageProps }) => { | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return | ||
return <Component {...pageProps} /> | ||
} | ||
|
||
export default App |
Oops, something went wrong.