mirror of
https://github.com/simstudioai/sim.git
synced 2026-09-22 05:19:54 +08:00
Adds the Academy section to the docs: video-first lessons (self-hosted MP4 on Vercel Blob), organized into Workflows, Agents, Tables, Files, and Knowledge Bases, each linking back to the reference docs. Lessons use a course layout (hero video with chapter seek, "what you'll learn", block diagrams). Docs only — no runtime or auth changes. The content may move to a separate CMS or its own site (academy.sim.ai) later; the docs are a starting point. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
27 lines
800 B
TypeScript
27 lines
800 B
TypeScript
import { type ClassValue, clsx } from 'clsx'
|
|
import { twMerge } from 'tailwind-merge'
|
|
|
|
/**
|
|
* Combines multiple class names into a single string, merging Tailwind classes properly
|
|
*/
|
|
export function cn(...inputs: ClassValue[]) {
|
|
return twMerge(clsx(inputs))
|
|
}
|
|
|
|
/**
|
|
* Get the full URL for an asset stored in Vercel Blob
|
|
* - If CDN is configured (NEXT_PUBLIC_BLOB_BASE_URL), uses CDN URL
|
|
* - Otherwise falls back to local static assets served from root path
|
|
*/
|
|
export function getAssetUrl(filename: string) {
|
|
// Absolute URLs (e.g. blob-hosted academy videos) are already complete.
|
|
if (/^https?:\/\//.test(filename)) {
|
|
return filename
|
|
}
|
|
const cdnBaseUrl = process.env.NEXT_PUBLIC_BLOB_BASE_URL
|
|
if (cdnBaseUrl) {
|
|
return `${cdnBaseUrl}/${filename}`
|
|
}
|
|
return `/${filename}`
|
|
}
|