Skip to content

About 277 wordsLess than 1 minute

2025-10-09

Overview

Applicable to articles with collection type set to 'post'.

Example:

frontmatter
---
title: Article Title
tags:
  - tag1
  - tag2
---

Configuration

sticky

  • Type: boolean | number
  • Default: false

Whether to pin the current article to the top in article lists.

If a number is provided, a higher value will position the article closer to the top when pinned. true ranks above any number, while 0, negative numbers and false are all treated as "not sticky".

Tips

Sticky articles are only pinned on the first page of the article list. From the second page onward, articles are shown in the normal chronological order.

article

  • Type: boolean
  • Default: true

Whether to display the current article in article lists.

draft

  • Type: boolean
  • Default: false

Marks the article as a draft. Articles marked as drafts only appear in article lists during development and are hidden in production environments.

tags

  • Type: string[]
  • Default: []

Article tags.

cover

  • Type: string
  • Default: ''

Article cover image. The cover image is only displayed on the article list page.

Only absolute paths and remote image URLs are supported.

coverStyle

  • Type: BlogPostCoverStyle
  • Default: null

Cover image configuration.

interface PostCoverStyle {
  /**
   * Layout position of the blog post cover image
   */
  layout?: 'left' | 'right' | 'odd-left' | 'odd-right' | 'top'
  /**
   * Aspect ratio of the blog post cover image
   *
   * @default '4:3'
   */
  ratio?: number | `${number}:${number}`

  /**
   * Width of the cover image, only effective when layout is 'left' or 'right'
   *
   * @default 240
   */
  width?: number
  /**
   * Whether to use compact mode. In compact mode, the cover image fits snugly against the container edge.
   * @default false
   */
  compact?: boolean
}

Contributors

Changelog

10/7/26, 2:17 PM
View All Changelog
  • 4773d-fix(theme): fix sorting of pinned articles is inconsistent with the TOP label (#1054)on
  • 0daf2-docs: improve docs (#929)on
  • 38505-docs: update en docs (#708)on