@lobehub/chat 1.11.5 → 1.11.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/package.json +1 -1
- package/src/app/metadata.ts +2 -3
- package/src/config/app.ts +2 -2
- package/src/server/ld.ts +8 -10
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
### [Version 1.11.6](https://github.com/lobehub/lobe-chat/compare/v1.11.5...v1.11.6)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2024-08-18**</sup>
|
|
8
|
+
|
|
9
|
+
#### ♻ Code Refactoring
|
|
10
|
+
|
|
11
|
+
- **misc**: Refactor the `SITE_URL` to `APP_URL`.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### Code refactoring
|
|
19
|
+
|
|
20
|
+
- **misc**: Refactor the `SITE_URL` to `APP_URL`, closes [#3504](https://github.com/lobehub/lobe-chat/issues/3504) ([46bdcea](https://github.com/lobehub/lobe-chat/commit/46bdcea))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
5
30
|
### [Version 1.11.5](https://github.com/lobehub/lobe-chat/compare/v1.11.4...v1.11.5)
|
|
6
31
|
|
|
7
32
|
<sup>Released on **2024-08-18**</sup>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.6",
|
|
4
4
|
"description": "Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"framework",
|
package/src/app/metadata.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { Metadata } from 'next';
|
|
2
2
|
|
|
3
|
-
import { appEnv
|
|
3
|
+
import { appEnv } from '@/config/app';
|
|
4
4
|
import { OFFICIAL_URL, OG_URL } from '@/const/url';
|
|
5
5
|
import { translation } from '@/server/translation';
|
|
6
6
|
|
|
7
7
|
const title = 'LobeChat';
|
|
8
8
|
|
|
9
|
-
const { SITE_URL = OFFICIAL_URL } = getAppConfig();
|
|
10
9
|
const BASE_PATH = appEnv.NEXT_PUBLIC_BASE_PATH;
|
|
11
10
|
|
|
12
11
|
// if there is a base path, then we don't need the manifest
|
|
@@ -27,7 +26,7 @@ export const generateMetadata = async (): Promise<Metadata> => {
|
|
|
27
26
|
shortcut: '/favicon-32x32.ico?v=1',
|
|
28
27
|
},
|
|
29
28
|
manifest: noManifest ? undefined : '/manifest.json',
|
|
30
|
-
metadataBase: new URL(
|
|
29
|
+
metadataBase: new URL(OFFICIAL_URL),
|
|
31
30
|
openGraph: {
|
|
32
31
|
description: t('chat.description'),
|
|
33
32
|
images: [
|
package/src/config/app.ts
CHANGED
|
@@ -30,7 +30,7 @@ export const getAppConfig = () => {
|
|
|
30
30
|
PLUGINS_INDEX_URL: z.string().url(),
|
|
31
31
|
PLUGIN_SETTINGS: z.string().optional(),
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
APP_URL: z.string().optional(),
|
|
34
34
|
},
|
|
35
35
|
runtimeEnv: {
|
|
36
36
|
NEXT_PUBLIC_BASE_PATH: process.env.NEXT_PUBLIC_BASE_PATH || '',
|
|
@@ -52,7 +52,7 @@ export const getAppConfig = () => {
|
|
|
52
52
|
: 'https://chat-plugins.lobehub.com',
|
|
53
53
|
|
|
54
54
|
PLUGIN_SETTINGS: process.env.PLUGIN_SETTINGS,
|
|
55
|
-
|
|
55
|
+
APP_URL: process.env.APP_URL,
|
|
56
56
|
},
|
|
57
57
|
});
|
|
58
58
|
};
|
package/src/server/ld.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import urlJoin from 'url-join';
|
|
2
2
|
|
|
3
|
-
import { getAppConfig } from '@/config/app';
|
|
4
3
|
import { EMAIL_BUSINESS, EMAIL_SUPPORT, OFFICIAL_SITE, OFFICIAL_URL, X } from '@/const/url';
|
|
5
4
|
|
|
6
5
|
import pkg from '../../package.json';
|
|
7
6
|
|
|
8
|
-
const { SITE_URL = OFFICIAL_URL } = getAppConfig();
|
|
9
7
|
const LAST_MODIFIED = new Date().toISOString();
|
|
10
8
|
export const AUTHOR_LIST = {
|
|
11
9
|
arvinxx: {
|
|
@@ -70,7 +68,7 @@ class Ld {
|
|
|
70
68
|
|
|
71
69
|
genOrganization() {
|
|
72
70
|
return {
|
|
73
|
-
'@id': this.getId(
|
|
71
|
+
'@id': this.getId(OFFICIAL_URL, '#organization'),
|
|
74
72
|
'@type': 'Organization',
|
|
75
73
|
'alternateName': 'LobeChat',
|
|
76
74
|
'contactPoint': {
|
|
@@ -102,7 +100,7 @@ class Ld {
|
|
|
102
100
|
|
|
103
101
|
getAuthors(ids: string[] = []) {
|
|
104
102
|
const defaultAuthor = {
|
|
105
|
-
'@id': this.getId(
|
|
103
|
+
'@id': this.getId(OFFICIAL_URL, '#organization'),
|
|
106
104
|
'@type': 'Organization',
|
|
107
105
|
};
|
|
108
106
|
if (!ids || ids.length === 0) return defaultAuthor;
|
|
@@ -142,7 +140,7 @@ class Ld {
|
|
|
142
140
|
'@id': fixedUrl,
|
|
143
141
|
'@type': 'WebPage',
|
|
144
142
|
'about': {
|
|
145
|
-
'@id': this.getId(
|
|
143
|
+
'@id': this.getId(OFFICIAL_URL, '#organization'),
|
|
146
144
|
},
|
|
147
145
|
'breadcrumbs': {
|
|
148
146
|
'@id': this.getId(fixedUrl, '#breadcrumb'),
|
|
@@ -155,7 +153,7 @@ class Ld {
|
|
|
155
153
|
},
|
|
156
154
|
'inLanguage': 'en-US',
|
|
157
155
|
'isPartOf': {
|
|
158
|
-
'@id': this.getId(
|
|
156
|
+
'@id': this.getId(OFFICIAL_URL, '#website'),
|
|
159
157
|
},
|
|
160
158
|
'name': this.fixTitle(title),
|
|
161
159
|
'primaryImageOfPage': {
|
|
@@ -188,15 +186,15 @@ class Ld {
|
|
|
188
186
|
|
|
189
187
|
genWebSite() {
|
|
190
188
|
const baseInfo: any = {
|
|
191
|
-
'@id': this.getId(
|
|
189
|
+
'@id': this.getId(OFFICIAL_URL, '#website'),
|
|
192
190
|
'@type': 'WebSite',
|
|
193
191
|
'description': pkg.description,
|
|
194
192
|
'inLanguage': 'en-US',
|
|
195
193
|
'name': 'LobeChat',
|
|
196
194
|
'publisher': {
|
|
197
|
-
'@id': this.getId(
|
|
195
|
+
'@id': this.getId(OFFICIAL_URL, '#organization'),
|
|
198
196
|
},
|
|
199
|
-
'url':
|
|
197
|
+
'url': OFFICIAL_URL,
|
|
200
198
|
};
|
|
201
199
|
|
|
202
200
|
return baseInfo;
|
|
@@ -211,7 +209,7 @@ class Ld {
|
|
|
211
209
|
}
|
|
212
210
|
|
|
213
211
|
private fixUrl(url: string) {
|
|
214
|
-
return urlJoin(
|
|
212
|
+
return urlJoin(OFFICIAL_URL, url);
|
|
215
213
|
}
|
|
216
214
|
}
|
|
217
215
|
|