Skip to content

Commit 96e1d0c

Browse files
committed
copy from sophdoc
0 parents  commit 96e1d0c

File tree

3,726 files changed

+298744
-0
lines changed

Some content is hidden

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

3,726 files changed

+298744
-0
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
name: "\U0001F6D1 Report a bug in the Documents"
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
12+
A clear and concise description of what the bug is.
13+
14+
**To Reproduce**
15+
16+
Steps to reproduce the behavior:
17+
1. Go to '...'
18+
2. Click on '...'
19+
3. Scroll down to '...'
20+
4. See error
21+
22+
**Expected behavior**
23+
24+
A clear and concise description of what you expected to happen.
25+
26+
**Screenshots**
27+
28+
If applicable, add screenshots to help explain your problem.
29+
30+
**Desktop (please complete the following information):**
31+
32+
- OS: [e.g. iOS]
33+
- Browser [e.g. chrome, safari]
34+
- Version [e.g. 22]
35+
36+
**Smartphone (please complete the following information):**
37+
38+
- Device: [e.g. iPhone6]
39+
- OS: [e.g. iOS8.1]
40+
- Browser [e.g. stock browser, safari]
41+
- Version [e.g. 22]
42+
43+
**Additional context**
44+
45+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/bug_report.yml

+123
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
name: Bug Report
2+
description: Create a report to identify and fix a bug
3+
title: "Bug: "
4+
labels: ["bug", "gitauto"]
5+
# assignees: [""]
6+
7+
body:
8+
- type: textarea
9+
id: bug_behavior
10+
attributes:
11+
label: Bug Behavior
12+
description: What is the bug? What is currently happening?
13+
placeholder: "Example: 'When I try to upload a file (over 100MB), the process fails with a timeout error. This disrupts my workflow and causes delays in my project.'"
14+
validations:
15+
required: true
16+
17+
- type: textarea
18+
id: logs
19+
attributes:
20+
label: Logs
21+
description: Include any logs such as error objects, stack traces, or console logs.
22+
placeholder: "Example: 'Error: TimeoutError: The request timed out after 30 seconds'"
23+
validations:
24+
required: true
25+
26+
- type: textarea
27+
id: screenshots
28+
attributes:
29+
label: Screenshots
30+
description: Add any screenshots such as error messages or unexpected behavior.
31+
placeholder: "Attach it here"
32+
validations:
33+
required: false
34+
35+
- type: input
36+
id: when_it_occurred
37+
attributes:
38+
label: When It Occurred
39+
description: When did the issue last occur?
40+
placeholder: "Example: 'Jul 10, 2024 12:08:00 AM UTC'"
41+
validations:
42+
required: true
43+
44+
- type: textarea
45+
id: steps_to_reproduce
46+
attributes:
47+
label: Steps to Reproduce
48+
description: How can we reproduce the bug?
49+
placeholder: |
50+
Example:
51+
1. Go to "Upload"
52+
2. Click on "Select File"
53+
3. Choose a large file (over 100MB)
54+
4. Click "Upload"
55+
5. See error
56+
value: |
57+
1.
58+
validations:
59+
required: true
60+
61+
- type: textarea
62+
id: expected_behavior
63+
attributes:
64+
label: Expected Behavior
65+
description: What do you expect to happen?
66+
placeholder: "Example: 'The file should upload successfully without any errors even if it's over 100MB.'"
67+
validations:
68+
required: true
69+
70+
- type: textarea
71+
id: possible_cause
72+
attributes:
73+
label: Possible Cause
74+
description: If you have any idea what might be causing the issue, describe it.
75+
placeholder: "Example: 'The issue may be related to the new file upload library introduced in version 1.2.3.'"
76+
validations:
77+
required: false
78+
79+
- type: input
80+
id: device
81+
attributes:
82+
label: Device
83+
description: Describe your device or server.
84+
placeholder: "MacBook Pro, 14-inch, 2023 (Check in 'About This Mac')"
85+
validations:
86+
required: true
87+
88+
- type: input
89+
id: os
90+
attributes:
91+
label: OS
92+
description: |
93+
Describe your operating system.
94+
- For Mac, check in "About This Mac".
95+
- For Windows, check in "Settings" > "System" > "About".
96+
- For iOS, check in "Settings" > "General" > "About" > "iOS Version".
97+
- For Linux, run `uname -a` in the terminal.
98+
- For your server, specify the provider such as AWS EC2, AWS Lambda, or etc.
99+
placeholder: "Sonoma 14.5"
100+
validations:
101+
required: true
102+
103+
- type: input
104+
id: browser
105+
attributes:
106+
label: Browser
107+
description: |
108+
Describe your browser.
109+
- For Chrome, "Chrome, Version 126.0.6478.127 (Official Build) (arm64)". Check in "3 dots" on the top right > "Help" > "About Google Chrome".
110+
- For Safari, "Safari, Version 17.5 (19618.2.12.11.6)". Check in "Safari" on the top left > "About Safari".
111+
- For non-browser issues, type "Server-side" or "Mobile App".
112+
placeholder: "Chrome, Version 126.0.6478.127 (Official Build) (arm64)"
113+
validations:
114+
required: true
115+
116+
- type: textarea
117+
id: additional_information
118+
attributes:
119+
label: Additional Information
120+
description: Include any other context or information.
121+
placeholder: "Describe it here"
122+
validations:
123+
required: false

.github/ISSUE_TEMPLATE/config.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: ✅ Connect US when your having questions.
4+
url: https://sophongo.github.io/sophdoc/
5+
about: If you have questions about product or need support building applicaion, please ask us
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: "\U0001F7E1 Request a feature in the Documents"
3+
about: If you have feature idea for Documents
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
12+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
13+
14+
**Describe the solution you'd like**
15+
16+
A clear and concise description of what you want to happen.
17+
18+
**Describe alternatives you've considered**
19+
20+
A clear and concise description of any alternative solutions or features you've considered.
21+
22+
**Additional context**
23+
24+
Add any other context or screenshots about the feature request here.
+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Feature Request
2+
description: Share your problem and suggest a new feature
3+
title: "Feature Request: "
4+
labels: ["enhancement", "gitauto"]
5+
# assignees: [""]
6+
7+
body:
8+
- type: textarea
9+
id: problem
10+
attributes:
11+
label: Problem
12+
description: What issue are you facing?
13+
placeholder: "Example: 'When I try to upload large files (over 100MB), the process succeeds but takes more than 10 minutes. This disrupts my workflow and causes delays in my project.'"
14+
validations:
15+
required: true
16+
17+
- type: textarea
18+
id: current_solution
19+
attributes:
20+
label: Current Solution
21+
description: How are you currently solving this problem?
22+
placeholder: "Example: 'To work around this, I'm splitting the files into smaller parts (less than 50MB each) and uploading them individually. This is time-consuming and mistake-prone.'"
23+
validations:
24+
required: true
25+
26+
- type: textarea
27+
id: proposed_solution
28+
attributes:
29+
label: Proposed Solution
30+
description: What do you want to happen?
31+
placeholder: "Example: 'I would like a feature that supports seamless uploading of large files, more than 100MB, without any timeouts or delays. This will help me save time and improve my productivity.'"
32+
validations:
33+
required: true
34+
35+
- type: textarea
36+
id: attachments
37+
attributes:
38+
label: Screenshots or Diagrams
39+
description: Add any screenshots or diagrams that can help us understand the feature request.
40+
placeholder: "Attach it here"
41+
validations:
42+
required: false
43+
44+
- type: textarea
45+
id: additional_information
46+
attributes:
47+
label: Additional Information
48+
description: Include any other information or screenshots.
49+
placeholder: "Describe it here"
50+
validations:
51+
required: false

.github/workflows/build-image.yaml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build and Push Multi-Arch Docker Image
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
8+
permissions:
9+
packages: write
10+
11+
env:
12+
MKDOCS_GIT_COMMITTERS_APIKEY: ${{ secrets.MKDOCS_GIT_COMMITTERS_APIKEY }}
13+
14+
jobs:
15+
build-and-push:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout Code
20+
uses: actions/checkout@v3
21+
22+
- name: Set up QEMU
23+
uses: docker/setup-qemu-action@v2
24+
with:
25+
platforms: linux/arm64, linux/amd64
26+
27+
- name: Set up Docker Buildx
28+
uses: docker/setup-buildx-action@v2
29+
30+
- name: Login to GitHub Container Registry
31+
uses: docker/login-action@v2
32+
with:
33+
registry: ghcr.io
34+
username: ${{ github.actor }}
35+
password: ${{ secrets.GITHUB_TOKEN }}
36+
37+
- name: Build and Push Docker Image
38+
uses: docker/build-push-action@v5
39+
with:
40+
context: .
41+
file: ./Dockerfile
42+
push: true
43+
tags: |
44+
ghcr.io/${{ github.repository }}/sophdoc:${{ github.ref_name }}
45+
ghcr.io/${{ github.repository }}/sophdoc:latest
46+
platforms: linux/amd64, linux/arm64

.github/workflows/deploy-pages.yaml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# This is a basic workflow to help you get started with Actions
2+
name: deploy-for-main
3+
4+
# Controls when the workflow will run
5+
on:
6+
push:
7+
branches: [ main ]
8+
9+
env:
10+
MKDOCS_GIT_COMMITTERS_APIKEY: ${{ secrets.MKDOCS_GIT_COMMITTERS_APIKEY }}
11+
12+
jobs:
13+
build:
14+
# The type of runner that the job will run on
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
# Clone the repository
19+
- uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
23+
- uses: actions/setup-python@v4
24+
with:
25+
python-version: 3.x
26+
cache: 'pip'
27+
28+
# Install dependencies
29+
- run: pip install -r requirements.txt --no-cache-dir
30+
31+
# Build docs
32+
- run: pwd
33+
- run: mkdocs gh-deploy -c --force

.gitignore

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.venv
2+
builds
3+
temp_dir
4+
.DS_Store
5+
_book/
6+
.idea/
7+
.vscode/
8+
public/
9+
scripts/config.py
10+
__pycache__
11+
.VSCodeCounter
12+
docs/zh/site/
13+
docs/en/site/
14+
*.docx
15+
ufile.log
16+
.env
17+
.obsidian/
18+
.cache/

Dockerfile

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# 构建阶段
2+
FROM python:3.12-slim AS builder
3+
4+
WORKDIR /docs
5+
6+
# 复制项目文件
7+
COPY . /docs
8+
9+
# 更新包管理器并安装 Git
10+
RUN apt-get update && apt-get install -y git \
11+
&& rm -rf /var/lib/apt/lists/*
12+
13+
# 安装 mkdocs 和依赖
14+
RUN pip install --no-cache-dir -r requirements.txt
15+
16+
# 构建静态文件
17+
RUN mkdocs build -f mkdocs.yml
18+
19+
# Nginx 阶段
20+
FROM nginx:alpine
21+
22+
# 复制 Nginx 配置文件
23+
COPY nginx.conf /etc/nginx/conf.d/default.conf
24+
25+
# 从构建阶段复制构建好的静态文件
26+
COPY --from=builder /docs/site /usr/share/nginx/html
27+
28+
# 暴露端口
29+
EXPOSE 8000
30+
31+
# Nginx 使用 daemon off 模式运行
32+
CMD ["nginx", "-g", "daemon off;"]

0 commit comments

Comments
 (0)