Skip to content

Commit 4a7771e

Browse files
authored
feat: faq (#113)
* faq page * faq * faq
1 parent 5a7b6e4 commit 4a7771e

File tree

201 files changed

+28370
-19688
lines changed

Some content is hidden

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

201 files changed

+28370
-19688
lines changed

.claude/faq.md

Lines changed: 558 additions & 0 deletions
Large diffs are not rendered by default.
File renamed without changes.
Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,23 @@
1+
# 百度统计
12
NEXT_PUBLIC_BAIDU_TONGJI=
3+
NEXT_PUBLIC_BAIDU_KEY=
4+
5+
# 谷歌
26
NEXT_PUBLIC_GOOGLE_ID=
7+
NEXT_PUBLIC_GOOGLE_VERIFICATION_ID=
8+
9+
# Rabbit
310
NEXT_PUBLIC_RYBBIT_TONGJI=
411
NEXT_PUBLIC_RYBBIT_TONGJI_SITEID=
512

13+
# 跳转到哪个服务
614
NEXT_PUBLIC_HOME_URL=
715
NEXT_PUBLIC_USER_URL=
816

917
# 备案号
1018
NEXT_PUBLIC_FILING_ADDRESS=
1119
# 公安备案号
12-
NEXT_PUBLIC_POLICE_FILING=
20+
NEXT_PUBLIC_POLICE_FILING=
21+
22+
# 展示FAQ
23+
NEXT_PUBLIC_FAQ=true
File renamed without changes.

.github/workflows/fastgpt-home-image.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@ name: Build FastGPT landing page image
22
on:
33
workflow_dispatch:
44
push:
5-
paths:
6-
- "projects/fastgpt/**"
75
branches:
8-
- "main"
6+
- 'main'
97

108
jobs:
119
build-fastgpt-landingpage-images:
@@ -52,8 +50,7 @@ jobs:
5250
- name: Build and push Docker images to ghcr.io and DockerHub
5351
uses: docker/build-push-action@v5
5452
with:
55-
context: projects/fastgpt
56-
file: projects/fastgpt/Dockerfile
53+
file: Dockerfile
5754
push: true
5855
tags: ${{ steps.meta.outputs.tags }}
5956
labels: ${{ steps.meta.outputs.labels }}
@@ -71,4 +68,4 @@ jobs:
7168
env:
7269
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
7370
with:
74-
args: set image deployment/fastgpt-home fastgpt-home=registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-home:${{ steps.datetime.outputs.datetime }}
71+
args: set image deployment/fastgpt-home fastgpt-home=registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-home:${{ steps.datetime.outputs.datetime }}

.github/workflows/preview.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ on:
44
workflow_dispatch:
55
pull_request_target:
66
paths:
7-
- "projects/fastgpt/**"
7+
- 'projects/fastgpt/**'
88

99
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
1010
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
1111
concurrency:
12-
group: "pages"
12+
group: 'pages'
1313
cancel-in-progress: false
1414

1515
permissions:
@@ -34,12 +34,12 @@ jobs:
3434
repository: ${{ github.event.pull_request.head.repo.full_name }}
3535
submodules: recursive # Fetch submodules
3636
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
37-
37+
3838
- uses: pnpm/action-setup@v4
3939
name: Install pnpm
4040
with:
4141
version: 9
42-
42+
4343
- name: Build
4444
env:
4545
NEXT_PUBLIC_HOME_URL: https://fastgpt.io
@@ -48,14 +48,14 @@ jobs:
4848
cd projects/fastgpt
4949
npm install
5050
npm run build
51-
51+
5252
- name: Deploy to Cloudflare Pages
5353
id: deploy
5454
uses: cloudflare/wrangler-action@v3
5555
with:
5656
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
5757
accountId: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}
58-
command: pages deploy ./projects/fastgpt/out --project-name=fastgpt-home
58+
command: pages deploy ./out --project-name=fastgpt-home
5959

6060
- name: Comment Preview URL
6161
uses: FinleyGe/[email protected]
@@ -66,10 +66,10 @@ jobs:
6666
title: FastGPT Homepage Preview
6767
body: |
6868
🚀 **FastGPT Homepage Preview Ready!**
69-
69+
7070
📱 **Preview URL:** ${{ steps.deploy.outputs.deployment-url }}
71-
71+
7272
🔗 [👀 Click here to visit preview](${{ steps.deploy.outputs.deployment-url }})
73-
73+
7474
---
75-
💡 This preview will be automatically updated when you push new commits to this PR.
75+
💡 This preview will be automatically updated when you push new commits to this PR.

.gitignore

Lines changed: 14 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,18 @@
1-
# dependencies
2-
node_modules/
3-
# next.js
4-
.next/
5-
out/
6-
# production
7-
build/
8-
.astro/
9-
10-
# misc
1+
### Node template
2+
.idea
113
.DS_Store
12-
*.pem
13-
14-
# debug
15-
npm-debug.log*
16-
yarn-debug.log*
17-
yarn-error.log*
18-
.pnpm-debug.log*
4+
dist
195

20-
# local env files
21-
.env*.local
22-
23-
# vercel
24-
.vercel
6+
# Dependency directories
7+
node_modules/
8+
.env
9+
.env.test
10+
.env.local
2511

26-
# typescript
27-
*.tsbuildinfo
28-
next-env.d.ts
29-
platform.json
30-
testApi/
31-
local/
32-
dist/
12+
# Next.js build output
13+
.next
14+
out
3315

34-
# hugo
35-
**/.hugo_build.lock
36-
docSite/public/
37-
docSite/resources/_gen/
38-
docSite/.vercel
16+
# sitemap
17+
*/sitemap*.xml
18+
*/robots.txt

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# if use pnpm
2+
enable-pre-post-scripts=true

.vscode/settings.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,7 @@
1515
"[typescript][typescriptreact]": {
1616
"editor.formatOnSave": true,
1717
"editor.defaultFormatter": "esbenp.prettier-vscode"
18-
}
18+
},
19+
"typescript.preferences.importModuleSpecifier": "non-relative",
20+
"eslint.validate": ["javascript", "javascriptreact", "typescript"],
1921
}

projects/fastgpt/Dockerfile renamed to Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Install dependencies only when needed
2-
FROM node:18.18-alpine AS builder
2+
FROM node:20.14.0-alpine AS builder
33
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
44
RUN apk add libc6-compat
55
WORKDIR /app
@@ -29,11 +29,11 @@ ENV NEXT_PUBLIC_RYBBIT_TONGJI_SITEID=$NEXT_PUBLIC_RYBBIT_TONGJI_SITEID
2929
COPY . ./
3030

3131
# Replace URLs in files (fix sed -i syntax for Alpine Linux)
32-
RUN sed -i "s#https://doc.fastgpt.io#https://doc.fastgpt.cn#g" $(grep -rl "https://doc.fastgpt.io" ./ || true)
33-
RUN sed -i "s#https://cloud.fastgpt.io#https://cloud.fastgpt.cn#g" $(grep -rl "https://cloud.fastgpt.io" ./ || true)
34-
RUN sed -i "s/defaultLocale = \"en\"/defaultLocale = \"zh\"/g" lib/i18n.ts
32+
RUN find . -type f -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" -o -name "*.json" | xargs grep -l "https://doc.fastgpt.io" | xargs -r sed -i "s#https://doc.fastgpt.io#https://doc.fastgpt.cn#g"
33+
RUN find . -type f -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" -o -name "*.json" | xargs grep -l "https://cloud.fastgpt.io" | xargs -r sed -i "s#https://cloud.fastgpt.io#https://cloud.fastgpt.cn#g"
34+
RUN if [ -f lib/i18n.ts ]; then sed -i "s/defaultLocale = \"en\"/defaultLocale = \"zh\"/g" lib/i18n.ts; fi
3535

36-
RUN npm install
36+
RUN npm run install
3737
RUN npm run build
3838

3939
FROM fholzer/nginx-brotli:latest

0 commit comments

Comments
 (0)