@aravindc26/velu 0.13.15 → 0.13.16
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
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import { RootProvider } from 'fumadocs-ui/provider/next';
|
|
3
3
|
import './global.css';
|
|
4
|
-
import '
|
|
5
|
-
import '
|
|
6
|
-
import '
|
|
4
|
+
import '../../engine-core/css/shared.css';
|
|
5
|
+
import '../../engine-core/css/search.css';
|
|
6
|
+
import '../../engine-core/css/copy-page.css';
|
|
7
7
|
|
|
8
8
|
export const metadata = {
|
|
9
9
|
title: 'Preview',
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { Metadata } from 'next';
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
|
-
import { getAppearance, getBannerConfig, getFontsConfig, getSeoConfig, getSiteDescription, getSiteFavicon, getSiteName, getSiteOrigin, getSitePrimaryColor } from '@/lib/velu';
|
|
3
|
+
import { getAppearance, getBannerConfig, getCliVersion, getFontsConfig, getSeoConfig, getSiteDescription, getSiteFavicon, getSiteName, getSiteOrigin, getSitePrimaryColor } from '@/lib/velu';
|
|
4
4
|
import { Providers } from '@/components/providers';
|
|
5
5
|
import { VeluAssistant } from '@/components/assistant';
|
|
6
6
|
import { VeluBanner } from '@/components/banner';
|
|
7
7
|
import './global.css';
|
|
8
|
-
import '
|
|
9
|
-
import '
|
|
10
|
-
import '
|
|
11
|
-
import '
|
|
8
|
+
import '../engine-core/css/shared.css';
|
|
9
|
+
import '../engine-core/css/search.css';
|
|
10
|
+
import '../engine-core/css/assistant.css';
|
|
11
|
+
import '../engine-core/css/copy-page.css';
|
|
12
12
|
|
|
13
13
|
function toAbsoluteUrl(origin: string, value: string): string {
|
|
14
14
|
const trimmed = value.trim();
|
|
@@ -80,6 +80,7 @@ export default function RootLayout({ children }: { children: ReactNode }) {
|
|
|
80
80
|
return (
|
|
81
81
|
<html lang="en" suppressHydrationWarning>
|
|
82
82
|
<head>
|
|
83
|
+
<meta name="generator" content={`velu-cli ${getCliVersion()}`} />
|
|
83
84
|
<link rel="sitemap" type="application/xml" href={`${siteOrigin}/sitemap.xml`} />
|
|
84
85
|
{fontsConfig && (() => {
|
|
85
86
|
// Collect Google Fonts families that don't use a custom source
|
package/src/engine/lib/velu.ts
CHANGED
|
@@ -1032,3 +1032,14 @@ export function getSiteOrigin(src?: VeluConfigSource): string {
|
|
|
1032
1032
|
|
|
1033
1033
|
return 'http://localhost:4321';
|
|
1034
1034
|
}
|
|
1035
|
+
|
|
1036
|
+
export function getCliVersion(): string {
|
|
1037
|
+
try {
|
|
1038
|
+
const constPath = resolve(process.cwd(), 'public', 'const.json');
|
|
1039
|
+
if (existsSync(constPath)) {
|
|
1040
|
+
const parsed = JSON.parse(readFileSync(constPath, 'utf-8'));
|
|
1041
|
+
if (typeof parsed.version === 'string') return parsed.version;
|
|
1042
|
+
}
|
|
1043
|
+
} catch {}
|
|
1044
|
+
return 'unknown';
|
|
1045
|
+
}
|