API reference

Get by slug

Resolve a single published article from its slug field.

Article routes look up an entry by the slug field.

const result = await elmapi.content.list('doc-articles', {
  state: 'published',
  where: { slug: { eq: 'installation' } },
  first: true,
});

When first: true is set, the response is one entry object (or a not-found error). Use that object for the page title, summary, body, and SEO fields.

Relations

The category field expands to a nested entry on read. Use article.fields.category.fields.slug when you need the parent category slug.