Core renderer components for Marvin CMS. Provides unstyled, semantic Astro components for rendering system entry types, plus framework-agnostic logic helpers.
npm install @inneropen/marvin-renderers-corePeer dependencies: astro (^4 or ^5), @inneropen/marvin-sdk (^2).
---
import { ArticleRenderer } from '@inneropen/marvin-renderers-core/astro';
import { getEntries } from '@inneropen/marvin-sdk';
const entries = await getEntries();
const article = entries[0];
---
<ArticleRenderer entry={article.toJSON()} />---
import { getRenderer } from '@inneropen/marvin-renderers-core/astro/registry';
import { resolveRendererName } from '@inneropen/marvin-renderers-core/logic';
const name = resolveRendererName(entry);
const Renderer = getRenderer(name);
---
{Renderer && <Renderer entry={entry} />}import {
resolveRendererName,
resolveRendererConfig,
extractBody,
extractField,
getFeaturedAsset,
isRoutable,
createRegistry,
} from '@inneropen/marvin-renderers-core/logic';All components accept { entry: MarvinEntry; config?: Record<string, unknown>; class?: string } and include a <slot /> for extensions.
| Renderer | Component | Entry Types | Semantics |
|---|---|---|---|
page |
PageRenderer |
page, project, reference, resource | <article> with title, summary, body, featured asset |
article |
ArticleRenderer |
article | Same as page + <time> for publishedAt |
faq |
FaqRenderer |
faq | <dl> with <dt> question / <dd> answer |
navigation |
NavigationRenderer |
navigation-item | <a> with href, optional target="_blank" |
Components ship unstyled. Use data-renderer and data-role attributes as styling hooks:
[data-renderer="article"] [data-role="title"] {
font-size: 2rem;
}
[data-renderer="article"] [data-role="published-at"] {
color: var(--muted);
}| Subpath | Contents |
|---|---|
./logic |
Pre-compiled ESM + types — resolve helpers, registry factory, type definitions |
./astro |
Astro source — all components + registry (processed at consumer build time) |
./astro/registry |
Registry only |
./astro/renderers/* |
Individual .astro components |
MIT