Skip to content

Commit a1539ca

Browse files
committed
init
0 parents  commit a1539ca

File tree

7 files changed

+97
-0
lines changed

7 files changed

+97
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules/
2+
.next/
3+
package-lock.json

initgit.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
rm -rf .git
2+
git init
3+
git add ./
4+
git commit -m 'init'
5+
git remote add origin [email protected]:batchor/docs
6+
git push origin main -f

next.config.mjs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import nextra from 'nextra'
2+
3+
const withNextra = nextra({
4+
theme: 'nextra-theme-docs',
5+
themeConfig: './theme.config.tsx'
6+
})
7+
8+
export default withNextra({
9+
i18n: {
10+
locales: ['en', 'zh'],
11+
defaultLocale: 'en'
12+
},
13+
basePath: "/docs",
14+
images: {
15+
remotePatterns: [
16+
{
17+
protocol: 'https',
18+
hostname: 'cdn.scienhub.com',
19+
port: '',
20+
pathname: '/**',
21+
},
22+
],
23+
},
24+
})

package.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"name": "docs",
3+
"version": "1.0.0",
4+
"description": "ScienHub docs",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1",
8+
"dev": "next",
9+
"build": "next build",
10+
"start": "next start"
11+
},
12+
"repository": {
13+
"type": "git",
14+
"url": "git+https://gitlab.com/scienhub/docs.git"
15+
},
16+
"keywords": [
17+
"Documentation"
18+
],
19+
"author": "ScienHub",
20+
"license": "ISC",
21+
"bugs": {
22+
"url": "https://gitlab.com/scienhub/docs/issues"
23+
},
24+
"homepage": "https://gitlab.com/scienhub/docs#readme",
25+
"dependencies": {
26+
"next": "^14.2.15",
27+
"nextra": "^3.0.8",
28+
"nextra-theme-docs": "^3.0.8",
29+
"react": "^18.3.1",
30+
"react-dom": "^18.3.1"
31+
}
32+
}

pages/en/index.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Welcome to Nextra
2+
3+
Hello, world!
4+
5+
import { Callout, FileTree } from 'nextra/components'
6+
7+
<Callout>
8+
Read more about Nextra's `_meta.js` files
9+
[here](/docs/guide/organize-files#_metajs).
10+
</Callout>

pages/zh/index.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Welcome to Nextra
2+
3+
Hello, world!

theme.config.tsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { DocsThemeConfig } from "nextra-theme-docs";
2+
import Image from "next/image"
3+
4+
const config: DocsThemeConfig = {
5+
logo: <><Image src="https://cdn.scienhub.com/scienhub-logo/scienhub-logo-transparent128.png" alt="ScienHub logo" width={32} height={32} /> <b className="ml-1">ScienHub</b></>,
6+
project: {
7+
link: 'https://github.com/shuding/nextra'
8+
},
9+
i18n: [
10+
{ locale: 'en', name: 'English' },
11+
{ locale: 'zh', name: '中文' },
12+
],
13+
footer: {
14+
content: <>2022-{new Date().getFullYear()} ©{' '} <a href="https://scienhub.com">ScienHub</a></>
15+
}
16+
// ... other theme options
17+
}
18+
19+
export default config

0 commit comments

Comments
 (0)