Skip to content

Commit a5922ef

Browse files
authored
Merge pull request #3812 from Blargian/vertical_stepper_support_all
support hN level headers for vertical stepper
2 parents 6bc4eab + 318cb65 commit a5922ef

File tree

6 files changed

+15
-8
lines changed

6 files changed

+15
-8
lines changed
File renamed without changes.

docs/guides/best-practices/partitioningkey.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ title: 'Choose a Low Cardinality Partitioning Key'
55
description: 'Use a low cardinality partitioning key or avoid using any partitioning key for your table.'
66
---
77

8-
import Content from '@site/docs/best-practices/partionning_keys.md';
8+
import Content from '@site/docs/best-practices/partitioning_keys.mdx';
99

1010
<Content />

docusaurus.config.en.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ const config = {
6060
// url: process.env.VERCEL_URL ? `https://${process.env.VERCEL_URL}` : 'https://bookish-disco-5997zvo.pages.github.io',
6161
baseUrl: "/docs/",
6262
baseUrlIssueBanner: true,
63-
onBrokenLinks: "warn",
63+
onBrokenLinks: "throw",
6464
onBrokenMarkdownLinks: "warn",
6565
onDuplicateRoutes: "throw",
66-
onBrokenAnchors: "warn",
66+
onBrokenAnchors: "throw",
6767
favicon: "img/docs_favicon.ico",
6868
organizationName: "ClickHouse",
6969
trailingSlash: false,

plugins/remark-custom-blocks.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,15 @@ const plugin = (options) => {
3737
if (attr.name === 'type' && typeof attr.value === 'string') {
3838
type = attr.value;
3939
} else if (attr.name === 'headerLevel' && typeof attr.value === 'string') {
40-
if (attr.value === "h3")
41-
headerLevel = 3
40+
let set_level = attr.value
41+
const regex = /h([2-5])/;
42+
const match = set_level.match(regex);
43+
// If there's a match, convert the captured group to a number
44+
if (match) {
45+
headerLevel = Number(match[1]);
46+
} else {
47+
throw new Error("VerticalStepper supported only for h2-5");
48+
}
4249
}
4350
}
4451
});

sidebars.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ const sidebars = {
8989
"best-practices/select_data_type",
9090
"best-practices/use_materialized_views",
9191
"best-practices/minimize_optimize_joins",
92-
"best-practices/partionning_keys",
92+
"best-practices/partitioning_keys",
9393
"best-practices/selecting_an_insert_strategy",
9494
"best-practices/using_data_skipping_indices",
9595
"best-practices/avoid_mutations",

src/components/Stepper/Stepper.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ const VStepper = ({
8989
const isExpandedMode = expanded === 'true';
9090

9191
let hType = 'h2';
92-
if (headerLevel == 3) {
93-
hType = 'h3'
92+
if (headerLevel > 2) {
93+
hType = `h${headerLevel}`
9494
}
9595

9696
// Get children and filter out non-elements

0 commit comments

Comments
 (0)