Skip to content

Commit 007fd18

Browse files
committed
init
0 parents  commit 007fd18

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+11645
-0
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Deploy Docs to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
workflow_dispatch: {}
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: pages
16+
cancel-in-progress: true
17+
18+
jobs:
19+
build:
20+
name: Build static docs
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: '18'
30+
cache: 'npm'
31+
cache-dependency-path: docs/package-lock.json
32+
33+
- name: Install dependencies
34+
working-directory: docs
35+
run: npm ci
36+
37+
- name: Build Next.js site
38+
working-directory: docs
39+
run: npm run build
40+
41+
- name: Add .nojekyll
42+
run: |
43+
touch docs/out/.nojekyll
44+
45+
- name: Copy CNAME if present
46+
if: ${{ hashFiles('CNAME') != '' }}
47+
run: |
48+
mkdir -p docs/out
49+
cp CNAME docs/out/CNAME
50+
51+
- name: Setup Pages
52+
uses: actions/configure-pages@v5
53+
54+
- name: Upload artifact
55+
uses: actions/upload-pages-artifact@v3
56+
with:
57+
path: docs/out
58+
59+
deploy:
60+
environment:
61+
name: github-pages
62+
url: ${{ steps.deployment.outputs.page_url }}
63+
needs: build
64+
runs-on: ubuntu-latest
65+
name: Deploy to GitHub Pages
66+
steps:
67+
- name: Deploy
68+
id: deployment
69+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
docs/node_modules
3+
docs/.next
4+
out
5+

CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
whitepaper.jumpserver.org

LICENSE

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# whitepaper.github.io
2+
JumpServer whitepaper

docs/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Nextra Docs Site
2+
3+
This folder contains a Nextra (Next.js) docs site that restructures the Word-exported whitepaper into clean MDX pages with a left sidebar.
4+
5+
Quick start
6+
7+
- Install: `npm i`
8+
- Dev: `npm run dev`http://localhost:3000
9+
- Build: `npm run build && npm start`
10+
11+
Content
12+
13+
- Pages live under `pages/` as `.mdx` files.
14+
- Sidebar is defined by `pages/_meta.json`.
15+
- Images should be placed in `public/whitepaper/` and referenced as `/whitepaper/<file>`.
16+

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/pages/building-your-application/configuring/typescript for more information.

docs/next.config.mjs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
reactStrictMode: true,
10+
output: 'export',
11+
images: {
12+
unoptimized: true
13+
}
14+
})

0 commit comments

Comments
 (0)