Blog & Content Components
API reference for article, contributor, and note components provided by @nuxtify/cms.
Overview
- Provided by:
@nuxtify/cms - Source directories:
article/,contributor/,note/, andAuthorByline.vue
These components power the built-in /articles, /topics, /contributors, and /notes routes and can also be reused on custom pages or overridden in app/components/.
Article Components
ArticleCard
Article preview card rendered on /articles, /topics/:slug, and /contributors/:slug. Displays the primary topic link (hidden when already viewing that topic's page), article title, summary, resolved AuthorByline (via useContributor), and published date via ArticleDate. Respects custom articles.routePrefix and topics.enabled / topics.routePrefix.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
article | Article | Required | Item from the articles collection. |
ArticleTitle
Left-aligned <header> block used on individual article detail pages.
Props & Slots
| Prop | Type | Default | Description |
|---|---|---|---|
overline | string | undefined | Optional eyebrow label styled in text-secondary. |
title | string | undefined | Article <h1> headline. |
description | string | undefined | Subtitle / summary below the title. |
Slots: overline, title, description (each with mdc-unwrap="p"), and default.
ArticleDate
Formats a publication or update timestamp with <NuxtTime> and optionally displays an estimated reading time underneath.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
timestamp | string | Date | Required | ISO date string or Date object passed to <NuxtTime>. |
updated | boolean | false | Prefixes date with 'Updated ' instead of 'Published '. |
hideTimestampText | boolean | false | Omits the 'Published ' / 'Updated ' prefix. |
monthFormat | 'short' | 'long' | 'short' | Month display format (Jan vs January). |
readTime | number | string | undefined | Minutes or formatted string (numbers < 1 render as '< 1 min read', integers render as 'X min read'). |
ArticleMobileToc
Collapsible mobile table of contents card rendered on narrow viewports above article content. Wraps <PageToc inline /> and automatically collapses when currentPath changes.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
links | PageTocLink[] | [] | Heading links from article.body.toc.links. |
title | string | 'On this page' | Toggle button label. |
currentPath | string | '' | Current route path watched to auto-collapse on navigation. |
Contributor Components
AuthorByline
Compact horizontal author attribution displaying a 36x36 circular <NuxtImg> avatar, formatted name with optional honorificSuffix (via honoraryName), and jobTitle. Automatically wraps itself in <NuxtLink> pointing to the contributor's profile when content.contributors.enabled is not false.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
author | Contributor | Required | Contributor object from the contributors collection. |
ContributorCustomContent
Empty placeholder component rendered at the bottom of /contributors/:slug beneath the contributor's bio and articles list. Create app/components/contributor/ContributorCustomContent.vue (or app/components/ContributorCustomContent.vue) in your app to add custom widgets — such as a newsletter CTA or portfolio section — without overriding the entire contributor page.
Note Components
NoteCard
Outlined card rendering a short-form note with its full Markdown body (<ContentRenderer> inside <PageContentStyles>), date permalink, clickable tag chips (linked to /tags/:slug when tags.enabled and notes.enabled are true), resolved AuthorByline, optional mailto: reply button (when email.reply is configured), and NoteShareButton. Uses <h1> on its own permalink page and <h2> on list/tag pages.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
note | Note | Required | Item from the notes collection. |
NoteShareButton
Share button powered by VueUse's useShare(). Opens the native Web Share dialog when supported by the browser, and falls back to copying the full canonical URL (siteConfig.url + path) to the clipboard via useCopyText() with a toast notification.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
path | string | Required | Relative URL path of the item being shared. |
title | string | Required | Share sheet title. |
text | string | Required | Share sheet body text. |