您可以添加到 Frontmatter 中的字段之一是 banner。它在页面顶部显示一个醒目的区块,并支持使用 HTML 进行链接和格式化。
仅在需要警示破坏性情况时使用它,并注意在适用时将其移除。
---
title: Banner
description: How to display a banner at the top of the page and when to use it.
banner:
content: Do <strong>not</strong> use banners in the <a href="/style-guide/frontmatter/">Frontmatter</a> unless a change will cause customer application to break.
---Note横幅用于提示重要信息。
---
title: Banner
description: How to display a banner at the top of the page and when to use it.
banner:
content: Ensure you read this!
type: note
---Tip横幅用于提示重要建议。
---
title: Banner
description: How to display a banner at the top of the page and when to use it.
banner:
content: Consider this alternative!
type: tip
---Caution横幅用于警告读者即将发生的破坏性变化。
---
title: Banner
description: How to display a banner at the top of the page and when to use it.
banner:
content: This is deprecated and will break on <strong>1970-01-01</strong>!
type: caution
---Danger横幅用于警告错误。
---
title: Banner
description: How to display a banner at the top of the page and when to use it.
banner:
content: This has been removed!
type: danger
---在所有其他情况下使用默认横幅。
---
title: Banner
description: How to display a banner at the top of the page and when to use it.
banner:
content: Do <strong>not</strong> use banners in the <a href="/style-guide/frontmatter/">Frontmatter</a> unless a change will cause customer application to break.
---