diff --git a/app/src/embed.jsx b/app/src/embed.jsx new file mode 100644 index 0000000..3b57bff --- /dev/null +++ b/app/src/embed.jsx @@ -0,0 +1,24 @@ +// Widget bootstrapper — reads URL path to render the correct widget. +// URL format: /embed/{type}/{slug} +// e.g. /embed/glossary/vector-database +import { createRoot } from 'react-dom/client'; +import { GlossaryWidget } from './widgets/GlossaryWidget.jsx'; +import { ArticleCardWidget } from './widgets/ArticleCardWidget.jsx'; +import { CompanyWidget } from './widgets/CompanyWidget.jsx'; + +const [, , type, slug] = window.location.pathname.split('/'); + +function Widget() { + if (!type || !slug) { + return