create-audora-next 0.1.1
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/LICENSE +21 -0
- package/README.md +54 -0
- package/index.ts +81 -0
- package/package.json +34 -0
- package/templates/base/README.md +152 -0
- package/templates/base/eslint.config.mjs +18 -0
- package/templates/base/lint-staged.config.mjs +17 -0
- package/templates/base/next.config.ts +38 -0
- package/templates/base/package.json +52 -0
- package/templates/base/postcss.config.mjs +7 -0
- package/templates/base/public/favicon/apple-touch-icon.png +0 -0
- package/templates/base/public/favicon/favicon-96x96.png +0 -0
- package/templates/base/public/favicon/favicon.ico +0 -0
- package/templates/base/public/favicon/favicon.svg +1 -0
- package/templates/base/public/favicon/site.webmanifest +21 -0
- package/templates/base/public/favicon/web-app-manifest-192x192.png +0 -0
- package/templates/base/public/favicon/web-app-manifest-512x512.png +0 -0
- package/templates/base/public/images/screenshot-desktop-dark.webp +0 -0
- package/templates/base/public/images/screenshot-desktop-light.webp +0 -0
- package/templates/base/public/images/screenshot-mobile-dark.webp +0 -0
- package/templates/base/public/images/screenshot-mobile-light.webp +0 -0
- package/templates/base/src/app/layout.tsx +52 -0
- package/templates/base/src/app/llms-full.txt/route.ts +97 -0
- package/templates/base/src/app/llms.txt/route.ts +40 -0
- package/templates/base/src/app/manifest.ts +61 -0
- package/templates/base/src/app/page.tsx +63 -0
- package/templates/base/src/app/robots.ts +16 -0
- package/templates/base/src/app/sitemap.ts +41 -0
- package/templates/base/src/components/copyable-code.tsx +41 -0
- package/templates/base/src/components/icons.tsx +84 -0
- package/templates/base/src/components/theme-provider.tsx +11 -0
- package/templates/base/src/components/theme-toggle.tsx +20 -0
- package/templates/base/src/config/site.ts +18 -0
- package/templates/base/src/data/llms.ts +112 -0
- package/templates/base/src/data/site.ts +30 -0
- package/templates/base/src/lib/seo.ts +190 -0
- package/templates/base/src/styles/globals.css +27 -0
- package/templates/base/src/utils/cn.ts +7 -0
- package/templates/base/tsconfig.json +34 -0
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
WebSite,
|
|
3
|
+
Organization,
|
|
4
|
+
BreadcrumbList,
|
|
5
|
+
WithContext,
|
|
6
|
+
} from "schema-dts";
|
|
7
|
+
import type { Metadata, Viewport } from "next";
|
|
8
|
+
import { SITE_CONFIG, META_THEME_COLORS } from "@/config/site";
|
|
9
|
+
|
|
10
|
+
// Page-Specific Metadata
|
|
11
|
+
interface PageMetadataProps {
|
|
12
|
+
title: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
image?: string;
|
|
15
|
+
path?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function getPageMetadata({
|
|
19
|
+
title,
|
|
20
|
+
description,
|
|
21
|
+
image,
|
|
22
|
+
path = "",
|
|
23
|
+
}: PageMetadataProps): Metadata {
|
|
24
|
+
const metaTitle = `${title} - ${SITE_CONFIG.name}`;
|
|
25
|
+
const metaDescription = description ?? SITE_CONFIG.description;
|
|
26
|
+
const metaImage = image ?? SITE_CONFIG.ogImage;
|
|
27
|
+
const sitePath = path
|
|
28
|
+
? `${SITE_CONFIG.url.replace(/\/$/, "")}/${path.replace(/^\//, "")}`
|
|
29
|
+
: SITE_CONFIG.url;
|
|
30
|
+
|
|
31
|
+
return {
|
|
32
|
+
metadataBase: new URL(SITE_CONFIG.url),
|
|
33
|
+
title,
|
|
34
|
+
description: metaDescription,
|
|
35
|
+
alternates: {
|
|
36
|
+
canonical: sitePath,
|
|
37
|
+
},
|
|
38
|
+
openGraph: {
|
|
39
|
+
title: metaTitle,
|
|
40
|
+
description: metaDescription,
|
|
41
|
+
url: sitePath,
|
|
42
|
+
siteName: SITE_CONFIG.name,
|
|
43
|
+
images: [
|
|
44
|
+
{
|
|
45
|
+
url: metaImage,
|
|
46
|
+
width: 1200,
|
|
47
|
+
height: 630,
|
|
48
|
+
alt: title,
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
locale: "en_US",
|
|
52
|
+
type: "website",
|
|
53
|
+
},
|
|
54
|
+
twitter: {
|
|
55
|
+
title: metaTitle,
|
|
56
|
+
description: metaDescription,
|
|
57
|
+
card: "summary_large_image",
|
|
58
|
+
images: [metaImage],
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Default Site Metadata
|
|
64
|
+
export function getMetadata(): Metadata {
|
|
65
|
+
return {
|
|
66
|
+
metadataBase: new URL(SITE_CONFIG.url),
|
|
67
|
+
alternates: {
|
|
68
|
+
canonical: "/",
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
title: {
|
|
72
|
+
template: `%s - ${SITE_CONFIG.name}`,
|
|
73
|
+
default: `${SITE_CONFIG.name} - ${SITE_CONFIG.tagline}`,
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
description: SITE_CONFIG.description,
|
|
77
|
+
keywords: SITE_CONFIG.keywords,
|
|
78
|
+
authors: [
|
|
79
|
+
{
|
|
80
|
+
name: SITE_CONFIG.name,
|
|
81
|
+
url: SITE_CONFIG.url,
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
|
|
85
|
+
creator: SITE_CONFIG.name,
|
|
86
|
+
openGraph: {
|
|
87
|
+
siteName: SITE_CONFIG.name,
|
|
88
|
+
url: SITE_CONFIG.url,
|
|
89
|
+
type: "website",
|
|
90
|
+
locale: "en_US",
|
|
91
|
+
title: `${SITE_CONFIG.name} - ${SITE_CONFIG.tagline}`,
|
|
92
|
+
description: SITE_CONFIG.shortDescription,
|
|
93
|
+
images: [
|
|
94
|
+
{
|
|
95
|
+
url: SITE_CONFIG.ogImage,
|
|
96
|
+
width: 1200,
|
|
97
|
+
height: 630,
|
|
98
|
+
alt: SITE_CONFIG.name,
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
},
|
|
102
|
+
|
|
103
|
+
twitter: {
|
|
104
|
+
card: "summary_large_image",
|
|
105
|
+
site: SITE_CONFIG.twitterHandle,
|
|
106
|
+
creator: SITE_CONFIG.twitterHandle,
|
|
107
|
+
title: `${SITE_CONFIG.name} - ${SITE_CONFIG.tagline}`,
|
|
108
|
+
description: SITE_CONFIG.shortDescription,
|
|
109
|
+
images: [SITE_CONFIG.ogImage],
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
icons: {
|
|
113
|
+
icon: [
|
|
114
|
+
{ url: "/favicon/favicon.ico", sizes: "any" },
|
|
115
|
+
{ url: "/favicon/favicon.svg", type: "image/svg+xml" },
|
|
116
|
+
],
|
|
117
|
+
apple: {
|
|
118
|
+
url: "/favicon/apple-touch-icon.png",
|
|
119
|
+
type: "image/png",
|
|
120
|
+
sizes: "180x180",
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
|
|
124
|
+
robots: {
|
|
125
|
+
index: true,
|
|
126
|
+
follow: true,
|
|
127
|
+
},
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// Viewport with Theme Colors
|
|
132
|
+
export function getViewport(): Viewport {
|
|
133
|
+
return {
|
|
134
|
+
width: "device-width",
|
|
135
|
+
initialScale: 1,
|
|
136
|
+
maximumScale: 5,
|
|
137
|
+
themeColor: [
|
|
138
|
+
{
|
|
139
|
+
media: "(prefers-color-scheme: light)",
|
|
140
|
+
color: META_THEME_COLORS.light,
|
|
141
|
+
},
|
|
142
|
+
{ media: "(prefers-color-scheme: dark)", color: META_THEME_COLORS.dark },
|
|
143
|
+
],
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// Structured Data (JSON-LD)
|
|
148
|
+
export function getWebSiteJsonLd(): WithContext<WebSite> {
|
|
149
|
+
return {
|
|
150
|
+
"@context": "https://schema.org",
|
|
151
|
+
"@type": "WebSite",
|
|
152
|
+
name: SITE_CONFIG.name,
|
|
153
|
+
url: SITE_CONFIG.url,
|
|
154
|
+
alternateName: SITE_CONFIG.alternateNames,
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export function getOrganizationJsonLd(): WithContext<Organization> {
|
|
159
|
+
return {
|
|
160
|
+
"@context": "https://schema.org",
|
|
161
|
+
"@type": "Organization",
|
|
162
|
+
name: SITE_CONFIG.name,
|
|
163
|
+
url: SITE_CONFIG.url,
|
|
164
|
+
logo: `${SITE_CONFIG.url}/favicon/favicon.svg`,
|
|
165
|
+
sameAs: [
|
|
166
|
+
`https://twitter.com/${SITE_CONFIG.twitterHandle.replace("@", "")}`,
|
|
167
|
+
"https://github.com/AudoraLabs",
|
|
168
|
+
],
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
interface BreadcrumbItem {
|
|
173
|
+
name: string;
|
|
174
|
+
url: string;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export function getBreadcrumbJsonLd(
|
|
178
|
+
items: BreadcrumbItem[]
|
|
179
|
+
): WithContext<BreadcrumbList> {
|
|
180
|
+
return {
|
|
181
|
+
"@context": "https://schema.org",
|
|
182
|
+
"@type": "BreadcrumbList",
|
|
183
|
+
itemListElement: items.map((item, index) => ({
|
|
184
|
+
"@type": "ListItem",
|
|
185
|
+
position: index + 1,
|
|
186
|
+
name: item.name,
|
|
187
|
+
item: item.url,
|
|
188
|
+
})),
|
|
189
|
+
};
|
|
190
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
|
|
3
|
+
/* Custom dark variant for Tailwind CSS v4 */
|
|
4
|
+
@custom-variant dark (&:where(.dark, .dark *));
|
|
5
|
+
|
|
6
|
+
:root {
|
|
7
|
+
--background: #ededed;
|
|
8
|
+
--foreground: #09090b;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.dark {
|
|
12
|
+
--background: #09090b;
|
|
13
|
+
--foreground: #ededed;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@theme inline {
|
|
17
|
+
--color-background: var(--background);
|
|
18
|
+
--color-foreground: var(--foreground);
|
|
19
|
+
--font-sans: var(--font-geist-sans);
|
|
20
|
+
--font-mono: var(--font-geist-mono);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
body {
|
|
24
|
+
background: var(--background);
|
|
25
|
+
color: var(--foreground);
|
|
26
|
+
font-family: Arial, Helvetica, sans-serif;
|
|
27
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2017",
|
|
4
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
5
|
+
"allowJs": true,
|
|
6
|
+
"skipLibCheck": true,
|
|
7
|
+
"strict": true,
|
|
8
|
+
"noEmit": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"module": "esnext",
|
|
11
|
+
"moduleResolution": "bundler",
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"jsx": "react-jsx",
|
|
15
|
+
"incremental": true,
|
|
16
|
+
"plugins": [
|
|
17
|
+
{
|
|
18
|
+
"name": "next"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"paths": {
|
|
22
|
+
"@/*": ["./src/*"]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"include": [
|
|
26
|
+
"next-env.d.ts",
|
|
27
|
+
"**/*.ts",
|
|
28
|
+
"**/*.tsx",
|
|
29
|
+
".next/types/**/*.ts",
|
|
30
|
+
".next/dev/types/**/*.ts",
|
|
31
|
+
"**/*.mts"
|
|
32
|
+
],
|
|
33
|
+
"exclude": ["node_modules"]
|
|
34
|
+
}
|