radiant-docs 0.1.63 → 0.1.64
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/package.json
CHANGED
|
@@ -8,6 +8,8 @@ import {
|
|
|
8
8
|
|
|
9
9
|
export type ClientShikiRuntimeConfig = AssistantShikiRuntimeConfig;
|
|
10
10
|
|
|
11
|
+
const DEFAULT_SHIKI_PLATFORM_ASSET_HOST = "https://static.radiantdocs.com";
|
|
12
|
+
|
|
11
13
|
function normalizeStaticAssetHost(value: unknown): string {
|
|
12
14
|
const rawValue = typeof value === "string" ? value.trim() : "";
|
|
13
15
|
if (!rawValue) return "";
|
|
@@ -43,9 +45,10 @@ function getConfiguredCodeSyntaxThemes(
|
|
|
43
45
|
export function getClientShikiRuntimeConfig(
|
|
44
46
|
config: DocsConfig,
|
|
45
47
|
): ClientShikiRuntimeConfig | undefined {
|
|
46
|
-
const staticAssetHost =
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
const staticAssetHost =
|
|
49
|
+
normalizeStaticAssetHost(
|
|
50
|
+
import.meta.env.STATIC_ASSET_HOST ?? process.env.STATIC_ASSET_HOST,
|
|
51
|
+
) || DEFAULT_SHIKI_PLATFORM_ASSET_HOST;
|
|
49
52
|
if (!staticAssetHost) {
|
|
50
53
|
return undefined;
|
|
51
54
|
}
|