docs: update cdn link (#698)

Signed-off-by: Carson Yang <yangchuansheng33@gmail.com>
This commit is contained in:
Carson Yang
2024-01-05 22:31:17 +08:00
committed by GitHub
parent 8d17f96600
commit 9329ddeac5
11 changed files with 89 additions and 10 deletions

View File

Before

Width:  |  Height:  |  Size: 148 KiB

After

Width:  |  Height:  |  Size: 148 KiB

View File

@@ -93,4 +93,4 @@ FastGPT 商业版软件根据不同的部署方式,分为 3 类收费模式。
Sealos 云服务属于按量计费,下面是它的价格表:
![](/imgs/sealos_price.png)
![](/imgs/sealos_price.jpg)

View File

@@ -25,13 +25,13 @@ curl https://doc.fastgpt.in/docs/intro/
### 1. 新建知识库,选择 Web 站点同步
![](/imgs/webSync2.jpg)
![](/imgs/webSync2.png)
![](/imgs/webSync3.jpg)
![](/imgs/webSync3.png)
### 2. 点击配置站点信息
![](/imgs/webSync4.jpg)
![](/imgs/webSync4.png)
### 3. 填写网址和选择器

View File

@@ -0,0 +1,32 @@
{{ $dest := .Destination }}
{{ $text := .PlainText }}
{{ $url := urls.Parse $dest }}
{{ if .Title }}
<figure>
{{ if eq $url.Scheme "" }}
{{ with $image := resources.Get $dest }}
{{ if eq $image.MediaType.SubType "svg" }}
{{ $image.Content | safeHTML }}
{{ else }}
<img src="{{ $image.RelPermalink | safeURL }}" alt="{{ $text }}" width="{{ $image.Width }}" height="{{ $image.Height }}" loading="lazy">
{{ end }}
{{ end }}
{{ else }}
<img src="{{ $dest | safeURL }}" alt="{{ $text }}" loading="lazy">
{{ end }}
<figcaption>{{ .Title | markdownify }}</figcaption>
</figure>
{{ else }}
{{ if eq $url.Scheme "" }}
{{ with $image := resources.Get $dest }}
{{ if eq $image.MediaType.SubType "svg" }}
{{ $image.Content | safeHTML }}
{{ else }}
<img src="{{ $image.RelPermalink | safeURL }}" alt="{{ $text }}" width="{{ $image.Width }}" height="{{ $image.Height }}" loading="lazy">
{{ end }}
{{ end }}
{{ else }}
<img src="{{ $dest | safeURL }}" alt="{{ $text }}" loading="lazy">
{{ end }}
{{ end }}

View File

@@ -58,7 +58,7 @@
<!-- change -->
<script
src="https://cdn.jsdelivr.net/npm/medium-zoom/dist/medium-zoom.min.js"
src="https://cdn.jsdelivr.us/npm/medium-zoom/dist/medium-zoom.min.js"
crossorigin="anonymous"
referrerpolicy="no-referrer"
></script>

View File

@@ -106,5 +106,5 @@
{{- end -}}
<!-- change -->
<script defer type="text/javascript" src="{{ "js/jsdelivr-auto-fallback.js" | absURL }}"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/lxgw-wenkai-screen-webfont@1.1.0/style.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.us/npm/lxgw-wenkai-screen-webfont@1.1.0/style.css" />
</head>

View File

@@ -4,17 +4,17 @@
let failed;
let isRunning;
const DEST_LIST = [
'cdn.jsdelivr.net',
'jsd.cdn.zzko.cn',
'cdn.jsdelivr.us',
'jsd.cdn.zzko.cn',
'jsd.onmicrosoft.cn',
'fastly.jsdelivr.net',
'gcore.jsdelivr.net'
'gcore.jsdelivr.net',
'cdn.jsdelivr.net',
];
const PREFIX = '//';
const SOURCE = DEST_LIST[0];
const starTime = Date.now();
const TIMEOUT = 2000;
const TIMEOUT = 1000;
const STORE_KEY = 'jsdelivr-auto-fallback';
const TEST_PATH = '/gh/PipecraftNet/jsdelivr-auto-fallback@main/empty.css?';
const shouldReplace = (text) => text && text.includes(PREFIX + SOURCE);