Skip to content

Commit

Permalink
Improve Qiskit release notes ToC settings (#965)
Browse files Browse the repository at this point in the history
Closes #941

This PR sets the `in_page_toc_max_heading_level` to 4 for legacy
versions of qiskit (< 0.45) and to 3 for 0.45+ versions. It also changes
the description of all the release notes to match the one we are using
in the API generation script: `Changes made in Qiskit {version}`

Given that we don't regenerate legacy release notes using the script, we
can set the `in_page_toc_max_heading_level` to 3 for all qiskit versions
and 2 for the rest of the APIs.

The changes to the latest release note were done by removing the file
and regenerating the 1.0.1 version. The rest of the files we manually
updated.
  • Loading branch information
arnaucasau authored Mar 5, 2024
1 parent dbe7b34 commit d8e9788
Show file tree
Hide file tree
Showing 44 changed files with 87 additions and 44 deletions.
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.10.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.10 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.10
in_page_toc_max_heading_level: 4
---

# Qiskit 0.10 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.11.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.11 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.11
in_page_toc_max_heading_level: 4
---

# Qiskit 0.11 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.12.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.12 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.12
in_page_toc_max_heading_level: 4
---

# Qiskit 0.12 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.13.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.13 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.13
in_page_toc_max_heading_level: 4
---

# Qiskit 0.13 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.14.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.14 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.14
in_page_toc_max_heading_level: 4
---

# Qiskit 0.14 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.15.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.15 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.15
in_page_toc_max_heading_level: 4
---

# Qiskit 0.15 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.16.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.16 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.16
in_page_toc_max_heading_level: 4
---

# Qiskit 0.16 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.17.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.17 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.17
in_page_toc_max_heading_level: 4
---

# Qiskit 0.17 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.18.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.18 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.18
in_page_toc_max_heading_level: 4
---

# Qiskit 0.18 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.19.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.19 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.19
in_page_toc_max_heading_level: 4
---

# Qiskit 0.19 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.20.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.20 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.20
in_page_toc_max_heading_level: 4
---

# Qiskit 0.20 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.21.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.21 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.21
in_page_toc_max_heading_level: 4
---

# Qiskit 0.21 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.22.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.22 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.22
in_page_toc_max_heading_level: 4
---

# Qiskit 0.22 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.23.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.23 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.23
in_page_toc_max_heading_level: 4
---

# Qiskit 0.23 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.24.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.24 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.24
in_page_toc_max_heading_level: 4
---

# Qiskit 0.24 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.25.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.25 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.25
in_page_toc_max_heading_level: 4
---

# Qiskit 0.25 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.26.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.26 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.26
in_page_toc_max_heading_level: 4
---

# Qiskit 0.26 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.27.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.27 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.27
in_page_toc_max_heading_level: 4
---

# Qiskit 0.27 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.28.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.28 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.28
in_page_toc_max_heading_level: 4
---

# Qiskit 0.28 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.29.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.29 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.29
in_page_toc_max_heading_level: 4
---

# Qiskit 0.29 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.30.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.30 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.30
in_page_toc_max_heading_level: 4
---

# Qiskit 0.30 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.31.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.31 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.31
in_page_toc_max_heading_level: 4
---

# Qiskit 0.31 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.32.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.32 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.32
in_page_toc_max_heading_level: 4
---

# Qiskit 0.32 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.33.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.33 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.33
in_page_toc_max_heading_level: 4
---

# Qiskit 0.33 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.34.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.34 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.34
in_page_toc_max_heading_level: 4
---

# Qiskit 0.34 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.35.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.35 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.35
in_page_toc_max_heading_level: 4
---

# Qiskit 0.35 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.36.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.36 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.36
in_page_toc_max_heading_level: 4
---

# Qiskit 0.36 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.37.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.37 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.37
in_page_toc_max_heading_level: 4
---

# Qiskit 0.37 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.38.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.38 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.38
in_page_toc_max_heading_level: 4
---

# Qiskit 0.38 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.39.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.39 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.39
in_page_toc_max_heading_level: 4
---

# Qiskit 0.39 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.40.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.40 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.40
in_page_toc_max_heading_level: 4
---

# Qiskit 0.40 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.41.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.41 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.41
in_page_toc_max_heading_level: 4
---

# Qiskit 0.41 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.42.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.42 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.42
in_page_toc_max_heading_level: 4
---

# Qiskit 0.42 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.43.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.43 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.43
in_page_toc_max_heading_level: 4
---

# Qiskit 0.43 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.44.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.44 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.44
in_page_toc_max_heading_level: 4
---

# Qiskit 0.44 release notes
Expand Down
2 changes: 1 addition & 1 deletion docs/api/qiskit/release-notes/0.45.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Qiskit 0.45 release notes
description: Changes made in Qiskit 0.45
in_page_toc_max_heading_level: 2
in_page_toc_max_heading_level: 3
---

<span id="release-notes" />
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.46.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.46 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.46
in_page_toc_max_heading_level: 3
---
# Qiskit 0.46 release notes

Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.5.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.5 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.5
in_page_toc_max_heading_level: 4
---

# Qiskit 0.5 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.6.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.6 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.6
in_page_toc_max_heading_level: 4
---

# Qiskit 0.6 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.7.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.7 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.7
in_page_toc_max_heading_level: 4
---

# Qiskit 0.7 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.8.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.8 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.8
in_page_toc_max_heading_level: 4
---

# Qiskit 0.8 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/0.9.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 0.9 release notes
description: New features and bug fixes
description: Changes made in Qiskit 0.9
in_page_toc_max_heading_level: 4
---

# Qiskit 0.9 release notes
Expand Down
3 changes: 2 additions & 1 deletion docs/api/qiskit/release-notes/1.0.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Qiskit 1.0 release notes
description: New features and bug fixes
description: Changes made in Qiskit 1.0
in_page_toc_max_heading_level: 3
---
# Qiskit 1.0 release notes

Expand Down
3 changes: 2 additions & 1 deletion scripts/lib/api/addFrontMatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,11 @@ ${markdown}
const descriptionSuffix = pkg.hasSeparateReleaseNotes
? `in ${pkg.title}${versionStr}`
: `to ${pkg.title}`;
const maxHeadingLevel = pkg.name == "qiskit" ? 3 : 2;
result.markdown = `---
title: ${pkg.title}${versionStr} release notes
description: Changes made ${descriptionSuffix}
in_page_toc_max_heading_level: 2
in_page_toc_max_heading_level: ${maxHeadingLevel}
---

${markdown}
Expand Down

0 comments on commit d8e9788

Please sign in to comment.