Skip to content

Commit

Permalink
Merge pull request #4502 from alphagov/document_heading_leve
Browse files Browse the repository at this point in the history
Document heading_level for heading blocks
  • Loading branch information
KludgeKML authored Jan 9, 2025
2 parents 844e45b + ab20c33 commit 2b00038
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/building_blocks_for_flexible_content.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,13 @@ When added through Whitehall content can either be written in HTML or govspeak m

A wrapper around the [Heading component](https://components.publishing.service.gov.uk/component-guide/heading). This block uses `content` where the component uses `text` for the title text key. This is so that headings can appear in search (only values inside a `content` key will be indexed when being published from Whitehall - see [Indexing block content in search](#indexing-block-content-in-search))

If an `id` is added, the heading can be referenced in an anchor link.
If an `id` is added, the heading can be referenced in an anchor link. `heading_level` can be used to specify the heading level (the default is 2) - you should usually have at least one `heading_level: 1` towards the beginning of a page's content.

```yaml
- type: heading
id: heading-id
content: Porem ipsum dolor
heading_level: 3
```

#### Image
Expand Down

0 comments on commit 2b00038

Please sign in to comment.