Article

An article can be a piece of content that informs about events or offers opinions on a subject. To allow a reader to engage with the content and other readers through a Conversation, you must define the associated article.

Designed to handle all article-related configurations. It enables publishers to specify how article metadata is fetched, customize its display, and configure additional settings for enhanced control.

Key Features

  • Support for server-side and local article metadata strategies.
  • Customizable section and header options.
  • Ability to enable or disable Read-Only Mode for conversations.

Types

OWArticle

export type OWArticle = {
  url: string;
  title?: string;
  subtitle?: string;
  thumbnailUrl?: string;
};
PropertyDescription
url (string)URL location of the article page.
title (string?)Name of the article.
subtitle (string?)Secondary heading of the article .
thumbnailUrl (string?)URL location of the thumbnail image.

OWArticleSettings

export type OWArticleSettings = {
  articleInformationStrategy?: OWArticleInformationStrategy;
  additionalSettings?: OWArticleAdditionalSettings;
};
PropertyDescription
articleInformationStrategy (OWArticleInformationStrategy?)Defines article metadata.
additionalSettings (OWArticleAdditionalSettings?)Defines article features.

OWArticleAdditionalSettings

export type OWArticleAdditionalSettings = {
  section?: string;
  headerStyle?: OWArticleHeaderStyle;
  readOnlyMode?: OWReadOnlyMode;
  starRating?: boolean;
};

Property

Description

section (String?)

Optional category identifier for organizing articles

headerStyle (OWArticleHeaderStyle?)

Defines the article header style.

Possible Values:

  • { type: typeof OWArticleHeaderStyleType.Regular } (default)
  • { type: typeof OWArticleHeaderStyleType.None }

readOnlyMode (OWReadOnlyMode?)

Defines if the article is read-only.

Possible Values:

  • { type: typeof OWReadOnlyModeType.Server } (default)
  • { type: typeof OWReadOnlyModeType.Disable }
  • { type: typeof OWReadOnlyModeType.Enable }

starRating (boolean?)

Activates the Social Review feature.

OWArticleInformationStrategy


export const OWArticleInformationStrategyType = {
  Server: 'server' as const,
  Local: 'local' as const,
};

export type OWArticleInformationStrategy =
  | { type: typeof OWArticleInformationStrategyType.Server }
  | { type: typeof OWArticleInformationStrategyType.Local; article: OWArticle };