diff --git a/docs/components/accordion/index.md b/docs/components/accordion/index.md index f8725b6d8..87c688d9c 100644 --- a/docs/components/accordion/index.md +++ b/docs/components/accordion/index.md @@ -1,7 +1,7 @@ --- +title: Accordion parts: - Accordion -title: Accordion eleventyNavigation: key: Accordion order: 0 diff --git a/docs/components/accordion/overview.md b/docs/components/accordion/overview.md index 67235c9f1..2f2fc29c6 100644 --- a/docs/components/accordion/overview.md +++ b/docs/components/accordion/overview.md @@ -1,8 +1,8 @@ --- +title: 'Accordion: Overview' parts: - Accordion - Overview -title: 'Accordion: Overview' eleventyNavigation: key: 'Accordion: Overview' order: 10 diff --git a/docs/components/accordion/reference.md b/docs/components/accordion/reference.md index 08e644972..7c19d6d92 100644 --- a/docs/components/accordion/reference.md +++ b/docs/components/accordion/reference.md @@ -1,8 +1,8 @@ --- +title: 'Accordion: Reference' parts: - Accordion - Reference -title: 'Accordion: Reference' eleventyNavigation: key: 'Accordion: Reference' order: 30 diff --git a/docs/components/accordion/use-cases.md b/docs/components/accordion/use-cases.md index 9e6ab55d0..fba8a41ac 100644 --- a/docs/components/accordion/use-cases.md +++ b/docs/components/accordion/use-cases.md @@ -1,8 +1,8 @@ --- +title: 'Accordion: Use Cases' parts: - Accordion - Use Cases -title: 'Accordion: Use Cases' eleventyNavigation: key: 'Accordion: Use Cases' order: 20 diff --git a/docs/components/button/extensions/BootstrapButtonTypes.ts b/docs/components/button/assets/BootstrapButtonTypes.ts similarity index 100% rename from docs/components/button/extensions/BootstrapButtonTypes.ts rename to docs/components/button/assets/BootstrapButtonTypes.ts diff --git a/docs/components/button/extensions/bootstrap-button.js b/docs/components/button/assets/bootstrap-button.js similarity index 100% rename from docs/components/button/extensions/bootstrap-button.js rename to docs/components/button/assets/bootstrap-button.js diff --git a/docs/components/button/examples.md b/docs/components/button/examples.md index be7765d0c..0ba32b0cc 100644 --- a/docs/components/button/examples.md +++ b/docs/components/button/examples.md @@ -1,8 +1,8 @@ --- +title: 'Button: Examples' parts: - Button - Examples -title: 'Button: Examples' eleventyNavigation: key: 'Button: Examples' order: 30 diff --git a/docs/components/button/extensions.md b/docs/components/button/extensions.md index b62a3c917..20120a591 100644 --- a/docs/components/button/extensions.md +++ b/docs/components/button/extensions.md @@ -1,8 +1,20 @@ -# Button >> Extensions ||90 +--- +title: 'Button: Extensions' +parts: + - Button + - Extensions +eleventyNavigation: + key: 'Button: Extensions' + order: 90 + parent: Button + title: Extensions +--- + +# Button: Extensions ```js script import { html } from '@mdjs/mdjs-preview'; -import './extensions/bootstrap-button.js'; +import './assets/bootstrap-button.js'; ``` ## Bootstrap button diff --git a/docs/components/button/index.md b/docs/components/button/index.md index 02c3ebf2c..888d238bb 100644 --- a/docs/components/button/index.md +++ b/docs/components/button/index.md @@ -1,3 +1,13 @@ -# Button ||10 +--- +title: Button +parts: + - Button +eleventyNavigation: + key: Button + title: Button + order: 10 +--- + +# Button -> go to Overview diff --git a/docs/components/button/overview.md b/docs/components/button/overview.md index ef30f9fec..d7c52bb26 100644 --- a/docs/components/button/overview.md +++ b/docs/components/button/overview.md @@ -1,4 +1,16 @@ -# Button >> Overview ||10 +--- +title: 'Button: Overview' +parts: + - Overview + - Button +eleventyNavigation: + key: Button >> Overview + title: Overview + order: 10 + parent: Button +--- + +# Button: Overview A button web component that is easily stylable and accessible. diff --git a/docs/components/button/use-cases.md b/docs/components/button/use-cases.md index dd32cff89..019bff8d4 100644 --- a/docs/components/button/use-cases.md +++ b/docs/components/button/use-cases.md @@ -1,4 +1,16 @@ -# Button >> Use Cases ||20 +--- +title: 'Button: Use Cases' +parts: + - Use Cases + - Button +eleventyNavigation: + key: Button >> Use Cases + title: Use Cases + order: 20 + parent: Button +--- + +# Button: Use Cases ```js script import { html } from '@mdjs/mdjs-preview'; @@ -28,16 +40,17 @@ export const disabled = () => html`Disabled` The minimum click area needs to be at least `44px` by `44px` according to [WCAG Success Criterion 2.5.5 Target Size (Enhanced)](https://www.w3.org/TR/WCAG22/#target-size-enhanced). ```js preview-story -export const minimumClickArea = () => html` - xs`; +export const minimumClickArea = () => + html` + xs`; ``` ## Usage with native form diff --git a/docs/components/calendar/index.md b/docs/components/calendar/index.md index 73dca582b..a81287c28 100644 --- a/docs/components/calendar/index.md +++ b/docs/components/calendar/index.md @@ -1,7 +1,7 @@ --- +title: Calendar parts: - Calendar -title: Calendar eleventyNavigation: key: Calendar order: 10 diff --git a/docs/components/calendar/overview.md b/docs/components/calendar/overview.md index 9ac547f29..cbe13f7f8 100644 --- a/docs/components/calendar/overview.md +++ b/docs/components/calendar/overview.md @@ -1,8 +1,8 @@ --- +title: 'Calendar: Overview' parts: - Calendar - Overview -title: 'Calendar: Overview' eleventyNavigation: key: 'Calendar: Overview' order: 10 diff --git a/docs/components/calendar/use-cases.md b/docs/components/calendar/use-cases.md index 3f2a9bbb3..f33387b46 100644 --- a/docs/components/calendar/use-cases.md +++ b/docs/components/calendar/use-cases.md @@ -1,11 +1,11 @@ --- +title: 'Calendar: Use Cases' parts: - Calendar - Use Cases -title: 'Calendar: Use Cases' eleventyNavigation: key: 'Calendar: Use Cases' - order: 20 + order: 0 parent: Calendar title: Use Cases --- diff --git a/docs/components/checkbox-group/index.md b/docs/components/checkbox-group/index.md index 0a7d0b68e..4f8734476 100644 --- a/docs/components/checkbox-group/index.md +++ b/docs/components/checkbox-group/index.md @@ -1,7 +1,7 @@ --- +title: Checkbox Group parts: - Checkbox Group -title: Checkbox Group eleventyNavigation: key: Checkbox Group order: 10 diff --git a/docs/components/checkbox-group/overview.md b/docs/components/checkbox-group/overview.md index 8d7d9df8c..d6035852a 100644 --- a/docs/components/checkbox-group/overview.md +++ b/docs/components/checkbox-group/overview.md @@ -1,8 +1,8 @@ --- +title: 'Checkbox Group: Overview' parts: - Checkbox Group - Overview -title: 'Checkbox Group: Overview' eleventyNavigation: key: 'Checkbox Group: Overview' order: 10 diff --git a/docs/components/checkbox-group/use-cases.md b/docs/components/checkbox-group/use-cases.md index f9cfc3e75..b30d7419c 100644 --- a/docs/components/checkbox-group/use-cases.md +++ b/docs/components/checkbox-group/use-cases.md @@ -1,8 +1,8 @@ --- +title: 'Checkbox Group: Use Cases' parts: - Checkbox Group - Use Cases -title: 'Checkbox Group: Use Cases' eleventyNavigation: key: 'Checkbox Group: Use Cases' order: 20 diff --git a/docs/components/collapsible/examples.md b/docs/components/collapsible/examples.md index 4f9e122dd..9fdd07351 100644 --- a/docs/components/collapsible/examples.md +++ b/docs/components/collapsible/examples.md @@ -1,8 +1,8 @@ --- +title: 'Collapsible: Examples' parts: - Collapsible - Examples -title: 'Collapsible: Examples' eleventyNavigation: key: 'Collapsible: Examples' order: 30 diff --git a/docs/components/collapsible/index.md b/docs/components/collapsible/index.md index 274af8f79..ca7190eee 100644 --- a/docs/components/collapsible/index.md +++ b/docs/components/collapsible/index.md @@ -1,7 +1,7 @@ --- +title: Collapsible parts: - Collapsible -title: Collapsible eleventyNavigation: key: Collapsible order: 10 diff --git a/docs/components/collapsible/overview.md b/docs/components/collapsible/overview.md index 35538c515..c1cdbd404 100644 --- a/docs/components/collapsible/overview.md +++ b/docs/components/collapsible/overview.md @@ -1,8 +1,8 @@ --- +title: 'Collapsible: Overview' parts: - Collapsible - Overview -title: 'Collapsible: Overview' eleventyNavigation: key: 'Collapsible: Overview' order: 10 diff --git a/docs/components/collapsible/use-cases.md b/docs/components/collapsible/use-cases.md index 78a40eafb..b15521c81 100644 --- a/docs/components/collapsible/use-cases.md +++ b/docs/components/collapsible/use-cases.md @@ -1,8 +1,8 @@ --- +title: 'Collapsible: Use Cases' parts: - Collapsible - Use Cases -title: 'Collapsible: Use Cases' eleventyNavigation: key: 'Collapsible: Use Cases' order: 20 diff --git a/docs/components/combobox/extensions.md b/docs/components/combobox/extensions.md index 71f04255d..d83503edc 100644 --- a/docs/components/combobox/extensions.md +++ b/docs/components/combobox/extensions.md @@ -1,8 +1,8 @@ --- +title: 'Combobox: Extensions' parts: - Combobox - Extensions -title: 'Combobox: Extensions' eleventyNavigation: key: 'Combobox: Extensions' order: 30 diff --git a/docs/components/combobox/index.md b/docs/components/combobox/index.md index 0f2c04eeb..bfd0afeaf 100644 --- a/docs/components/combobox/index.md +++ b/docs/components/combobox/index.md @@ -1,7 +1,7 @@ --- +title: Combobox parts: - Combobox -title: Combobox eleventyNavigation: key: Combobox order: 10 diff --git a/docs/components/combobox/overview.md b/docs/components/combobox/overview.md index 2085c3c98..0e5465216 100644 --- a/docs/components/combobox/overview.md +++ b/docs/components/combobox/overview.md @@ -1,8 +1,8 @@ --- +title: 'Combobox: Overview' parts: - Combobox - Overview -title: 'Combobox: Overview' eleventyNavigation: key: 'Combobox: Overview' order: 10 diff --git a/docs/components/combobox/use-cases.md b/docs/components/combobox/use-cases.md index 853076b9f..cdc3f6f54 100644 --- a/docs/components/combobox/use-cases.md +++ b/docs/components/combobox/use-cases.md @@ -1,8 +1,8 @@ --- +title: 'Combobox: Use Cases' parts: - Combobox - Use Cases -title: 'Combobox: Use Cases' eleventyNavigation: key: 'Combobox: Use Cases' order: 20 diff --git a/docs/components/dialog/index.md b/docs/components/dialog/index.md index ee88c5115..b64fec60d 100644 --- a/docs/components/dialog/index.md +++ b/docs/components/dialog/index.md @@ -1,7 +1,7 @@ --- +title: Dialog parts: - Dialog -title: Dialog eleventyNavigation: key: Dialog order: 20 diff --git a/docs/components/dialog/overview.md b/docs/components/dialog/overview.md index 2e5ab65b5..9f7dcd5df 100644 --- a/docs/components/dialog/overview.md +++ b/docs/components/dialog/overview.md @@ -1,8 +1,8 @@ --- +title: 'Dialog: Overview' parts: - Dialog - Overview -title: 'Dialog: Overview' eleventyNavigation: key: 'Dialog: Overview' order: 10 diff --git a/docs/components/dialog/use-cases.md b/docs/components/dialog/use-cases.md index ff2587f5d..7a73f52d8 100644 --- a/docs/components/dialog/use-cases.md +++ b/docs/components/dialog/use-cases.md @@ -1,8 +1,8 @@ --- +title: 'Dialog: Use Cases' parts: - Dialog - Use Cases -title: 'Dialog: Use Cases' eleventyNavigation: key: 'Dialog: Use Cases' order: 20 diff --git a/docs/components/drawer/index.md b/docs/components/drawer/index.md index 568d61920..ccb14a7c8 100644 --- a/docs/components/drawer/index.md +++ b/docs/components/drawer/index.md @@ -1,7 +1,7 @@ --- +title: Drawer parts: - Drawer -title: Drawer eleventyNavigation: key: Drawer order: 20 diff --git a/docs/components/drawer/overview.md b/docs/components/drawer/overview.md index 56e95eddc..2de3a10e2 100644 --- a/docs/components/drawer/overview.md +++ b/docs/components/drawer/overview.md @@ -1,8 +1,8 @@ --- +title: 'Drawer: Overview' parts: - Drawer - Overview -title: 'Drawer: Overview' eleventyNavigation: key: 'Drawer: Overview' order: 10 diff --git a/docs/components/drawer/use-cases.md b/docs/components/drawer/use-cases.md index ad944a7cc..4a8d56fa2 100644 --- a/docs/components/drawer/use-cases.md +++ b/docs/components/drawer/use-cases.md @@ -1,8 +1,8 @@ --- +title: 'Drawer: Use Cases' parts: - Drawer - Use Cases -title: 'Drawer: Use Cases' eleventyNavigation: key: 'Drawer: Use Cases' order: 20 diff --git a/docs/components/fieldset/index.md b/docs/components/fieldset/index.md index e165213cc..9f6cf87c6 100644 --- a/docs/components/fieldset/index.md +++ b/docs/components/fieldset/index.md @@ -1,7 +1,7 @@ --- +title: Fieldset parts: - Fieldset -title: Fieldset eleventyNavigation: key: Fieldset order: 20 diff --git a/docs/components/fieldset/overview.md b/docs/components/fieldset/overview.md index 711b7c820..5f2d225b3 100644 --- a/docs/components/fieldset/overview.md +++ b/docs/components/fieldset/overview.md @@ -1,8 +1,8 @@ --- +title: 'Fieldset: Overview' parts: - Fieldset - Overview -title: 'Fieldset: Overview' eleventyNavigation: key: 'Fieldset: Overview' order: 10 diff --git a/docs/components/fieldset/use-cases.md b/docs/components/fieldset/use-cases.md index 665c4d003..44508f80e 100644 --- a/docs/components/fieldset/use-cases.md +++ b/docs/components/fieldset/use-cases.md @@ -1,8 +1,8 @@ --- +title: 'Fieldset: Use Cases' parts: - Fieldset - Use Cases -title: 'Fieldset: Use Cases' eleventyNavigation: key: 'Fieldset: Use Cases' order: 20 diff --git a/docs/components/form/index.md b/docs/components/form/index.md index 932ee79fd..118f5b052 100644 --- a/docs/components/form/index.md +++ b/docs/components/form/index.md @@ -1,7 +1,7 @@ --- +title: Form parts: - Form -title: Form eleventyNavigation: key: Form order: 20 diff --git a/docs/components/form/overview.md b/docs/components/form/overview.md index 73f4411fc..1f0ee83c7 100644 --- a/docs/components/form/overview.md +++ b/docs/components/form/overview.md @@ -1,8 +1,8 @@ --- +title: 'Form: Overview' parts: - Form - Overview -title: 'Form: Overview' eleventyNavigation: key: 'Form: Overview' order: 10 diff --git a/docs/components/form/use-cases.md b/docs/components/form/use-cases.md index 3b2878c52..e1b15c409 100644 --- a/docs/components/form/use-cases.md +++ b/docs/components/form/use-cases.md @@ -1,8 +1,8 @@ --- +title: 'Form: Use Cases' parts: - Form - Use Cases -title: 'Form: Use Cases' eleventyNavigation: key: 'Form: Use Cases' order: 20 diff --git a/docs/components/icon/index.md b/docs/components/icon/index.md index 265a58cb6..cc22fc0ce 100644 --- a/docs/components/icon/index.md +++ b/docs/components/icon/index.md @@ -1,7 +1,7 @@ --- +title: Icon parts: - Icon -title: Icon eleventyNavigation: key: Icon order: 20 diff --git a/docs/components/icon/overview.md b/docs/components/icon/overview.md index 953df94d0..b4f921196 100644 --- a/docs/components/icon/overview.md +++ b/docs/components/icon/overview.md @@ -1,8 +1,8 @@ --- +title: 'Icon: Overview' parts: - Icon - Overview -title: 'Icon: Overview' eleventyNavigation: key: 'Icon: Overview' order: 10 diff --git a/docs/components/icon/use-cases.md b/docs/components/icon/use-cases.md index 432667b36..88334186f 100644 --- a/docs/components/icon/use-cases.md +++ b/docs/components/icon/use-cases.md @@ -1,8 +1,8 @@ --- +title: 'Icon: Use Cases' parts: - Icon - Use Cases -title: 'Icon: Use Cases' eleventyNavigation: key: 'Icon: Use Cases' order: 20 diff --git a/docs/components/index.md b/docs/components/index.md index f55e4acc9..2c8a758a0 100644 --- a/docs/components/index.md +++ b/docs/components/index.md @@ -1,7 +1,7 @@ --- +title: Components parts: - Components -title: Components eleventyNavigation: key: Components order: 40 diff --git a/docs/components/input-amount-dropdown/index.md b/docs/components/input-amount-dropdown/index.md index 7d27c7295..8c870d743 100644 --- a/docs/components/input-amount-dropdown/index.md +++ b/docs/components/input-amount-dropdown/index.md @@ -1,7 +1,7 @@ --- +title: Input Amount Dropdown parts: - Input Amount Dropdown -title: Input Amount Dropdown eleventyNavigation: key: Input Amount Dropdown order: 20 diff --git a/docs/components/input-amount-dropdown/use-cases.md b/docs/components/input-amount-dropdown/use-cases.md index 69b02d553..cb5691003 100644 --- a/docs/components/input-amount-dropdown/use-cases.md +++ b/docs/components/input-amount-dropdown/use-cases.md @@ -1,8 +1,8 @@ --- +title: 'Input Amount Dropdown: Use Cases' parts: - Input Amount Dropdown - Use Cases -title: 'Input Amount Dropdown: Use Cases' eleventyNavigation: key: 'Input Amount Dropdown: Use Cases' order: 20 diff --git a/docs/components/input-amount/index.md b/docs/components/input-amount/index.md index 56af5b240..97379582c 100644 --- a/docs/components/input-amount/index.md +++ b/docs/components/input-amount/index.md @@ -1,7 +1,7 @@ --- +title: Input Amount parts: - Input Amount -title: Input Amount eleventyNavigation: key: Input Amount order: 20 diff --git a/docs/components/input-amount/overview.md b/docs/components/input-amount/overview.md index fb0d04c18..627d9af95 100644 --- a/docs/components/input-amount/overview.md +++ b/docs/components/input-amount/overview.md @@ -1,8 +1,8 @@ --- +title: 'Input Amount: Overview' parts: - Input Amount - Overview -title: 'Input Amount: Overview' eleventyNavigation: key: 'Input Amount: Overview' order: 10 diff --git a/docs/components/input-amount/use-cases.md b/docs/components/input-amount/use-cases.md index 3f3aab53f..f7a4765cf 100644 --- a/docs/components/input-amount/use-cases.md +++ b/docs/components/input-amount/use-cases.md @@ -1,8 +1,8 @@ --- +title: 'Input Amount: Use Cases' parts: - Input Amount - Use Cases -title: 'Input Amount: Use Cases' eleventyNavigation: key: 'Input Amount: Use Cases' order: 20 diff --git a/docs/components/input-date/index.md b/docs/components/input-date/index.md index 130b56048..f455aa54a 100644 --- a/docs/components/input-date/index.md +++ b/docs/components/input-date/index.md @@ -1,7 +1,7 @@ --- +title: Input Date parts: - Input Date -title: Input Date eleventyNavigation: key: Input Date order: 20 diff --git a/docs/components/input-date/overview.md b/docs/components/input-date/overview.md index f193e5467..e88e261ac 100644 --- a/docs/components/input-date/overview.md +++ b/docs/components/input-date/overview.md @@ -1,8 +1,8 @@ --- +title: 'Input Date: Overview' parts: - Input Date - Overview -title: 'Input Date: Overview' eleventyNavigation: key: 'Input Date: Overview' order: 10 diff --git a/docs/components/input-date/use-cases.md b/docs/components/input-date/use-cases.md index 884028ef5..805edaf09 100644 --- a/docs/components/input-date/use-cases.md +++ b/docs/components/input-date/use-cases.md @@ -1,8 +1,8 @@ --- +title: 'Input Date: Use Cases' parts: - Input Date - Use Cases -title: 'Input Date: Use Cases' eleventyNavigation: key: 'Input Date: Use Cases' order: 20 diff --git a/docs/components/input-datepicker/index.md b/docs/components/input-datepicker/index.md index 4c73ffaf5..221a41368 100644 --- a/docs/components/input-datepicker/index.md +++ b/docs/components/input-datepicker/index.md @@ -1,7 +1,7 @@ --- +title: Input Datepicker parts: - Input Datepicker -title: Input Datepicker eleventyNavigation: key: Input Datepicker order: 20 diff --git a/docs/components/input-datepicker/overview.md b/docs/components/input-datepicker/overview.md index 82b27dfa4..dbec08dea 100644 --- a/docs/components/input-datepicker/overview.md +++ b/docs/components/input-datepicker/overview.md @@ -1,8 +1,8 @@ --- +title: 'Input Datepicker: Overview' parts: - Input Datepicker - Overview -title: 'Input Datepicker: Overview' eleventyNavigation: key: 'Input Datepicker: Overview' order: 10 diff --git a/docs/components/input-datepicker/use-cases.md b/docs/components/input-datepicker/use-cases.md index 80b7df3a3..90288ca43 100644 --- a/docs/components/input-datepicker/use-cases.md +++ b/docs/components/input-datepicker/use-cases.md @@ -1,8 +1,8 @@ --- +title: 'Input Datepicker: Use Cases' parts: - Input Datepicker - Use Cases -title: 'Input Datepicker: Use Cases' eleventyNavigation: key: 'Input Datepicker: Use Cases' order: 20 diff --git a/docs/components/input-email/index.md b/docs/components/input-email/index.md index 05bc21ace..dd9fee410 100644 --- a/docs/components/input-email/index.md +++ b/docs/components/input-email/index.md @@ -1,7 +1,7 @@ --- +title: Input Email parts: - Input Email -title: Input Email eleventyNavigation: key: Input Email order: 20 diff --git a/docs/components/input-email/overview.md b/docs/components/input-email/overview.md index 9596ef49b..16f947711 100644 --- a/docs/components/input-email/overview.md +++ b/docs/components/input-email/overview.md @@ -1,8 +1,8 @@ --- +title: 'Input Email: Overview' parts: - Input Email - Overview -title: 'Input Email: Overview' eleventyNavigation: key: 'Input Email: Overview' order: 10 diff --git a/docs/components/input-email/use-cases.md b/docs/components/input-email/use-cases.md index 5cbffd793..290dbff8d 100644 --- a/docs/components/input-email/use-cases.md +++ b/docs/components/input-email/use-cases.md @@ -1,8 +1,8 @@ --- +title: 'Input Email: Use Cases' parts: - Input Email - Use Cases -title: 'Input Email: Use Cases' eleventyNavigation: key: 'Input Email: Use Cases' order: 20 diff --git a/docs/components/input-file/index.md b/docs/components/input-file/index.md index 4e36f855b..427cc6cc6 100644 --- a/docs/components/input-file/index.md +++ b/docs/components/input-file/index.md @@ -1,7 +1,7 @@ --- +title: Input File parts: - Input File -title: Input File eleventyNavigation: key: Input File order: 20 diff --git a/docs/components/input-file/overview.md b/docs/components/input-file/overview.md index c74d0f8df..8fc127e86 100644 --- a/docs/components/input-file/overview.md +++ b/docs/components/input-file/overview.md @@ -1,8 +1,8 @@ --- +title: 'Input File: Overview' parts: - Input File - Overview -title: 'Input File: Overview' eleventyNavigation: key: 'Input File: Overview' order: 10 diff --git a/docs/components/input-file/use-cases.md b/docs/components/input-file/use-cases.md index 6c6229273..1bc0e7b2a 100644 --- a/docs/components/input-file/use-cases.md +++ b/docs/components/input-file/use-cases.md @@ -1,8 +1,8 @@ --- +title: 'Input File: Use Cases' parts: - Input File - Use Cases -title: 'Input File: Use Cases' eleventyNavigation: key: 'Input File: Use Cases' order: 20 diff --git a/docs/components/input-iban/index.md b/docs/components/input-iban/index.md index 4ffcde418..cabf86d59 100644 --- a/docs/components/input-iban/index.md +++ b/docs/components/input-iban/index.md @@ -1,7 +1,7 @@ --- +title: Input Iban parts: - Input Iban -title: Input Iban eleventyNavigation: key: Input Iban order: 20 diff --git a/docs/components/input-iban/overview.md b/docs/components/input-iban/overview.md index 6f2d8a45c..13c206ef9 100644 --- a/docs/components/input-iban/overview.md +++ b/docs/components/input-iban/overview.md @@ -1,8 +1,8 @@ --- +title: 'Input Iban: Overview' parts: - Input Iban - Overview -title: 'Input Iban: Overview' eleventyNavigation: key: 'Input Iban: Overview' order: 10 diff --git a/docs/components/input-iban/use-cases.md b/docs/components/input-iban/use-cases.md index 303286e57..1ce437cb1 100644 --- a/docs/components/input-iban/use-cases.md +++ b/docs/components/input-iban/use-cases.md @@ -1,8 +1,8 @@ --- +title: 'Input Iban: Use Cases' parts: - Input Iban - Use Cases -title: 'Input Iban: Use Cases' eleventyNavigation: key: 'Input Iban: Use Cases' order: 20 diff --git a/docs/components/input-range/index.md b/docs/components/input-range/index.md index 7dfb3f359..9187e2b4d 100644 --- a/docs/components/input-range/index.md +++ b/docs/components/input-range/index.md @@ -1,7 +1,7 @@ --- +title: Input Range parts: - Input Range -title: Input Range eleventyNavigation: key: Input Range order: 20 diff --git a/docs/components/input-range/overview.md b/docs/components/input-range/overview.md index 65df27c9e..433a99bd1 100644 --- a/docs/components/input-range/overview.md +++ b/docs/components/input-range/overview.md @@ -1,8 +1,8 @@ --- +title: 'Input Range: Overview' parts: - Input Range - Overview -title: 'Input Range: Overview' eleventyNavigation: key: 'Input Range: Overview' order: 10 diff --git a/docs/components/input-range/use-cases.md b/docs/components/input-range/use-cases.md index 4540c94db..f66047411 100644 --- a/docs/components/input-range/use-cases.md +++ b/docs/components/input-range/use-cases.md @@ -1,8 +1,8 @@ --- +title: 'Input Range: Use Cases' parts: - Input Range - Use Cases -title: 'Input Range: Use Cases' eleventyNavigation: key: 'Input Range: Use Cases' order: 20 diff --git a/docs/components/input-stepper/index.md b/docs/components/input-stepper/index.md index 2f1e07e1b..c2f86ff37 100644 --- a/docs/components/input-stepper/index.md +++ b/docs/components/input-stepper/index.md @@ -1,7 +1,7 @@ --- +title: Input Stepper parts: - Input Stepper -title: Input Stepper eleventyNavigation: key: Input Stepper order: 20 diff --git a/docs/components/input-stepper/overview.md b/docs/components/input-stepper/overview.md index f2ee77da1..ae2c1f5bd 100644 --- a/docs/components/input-stepper/overview.md +++ b/docs/components/input-stepper/overview.md @@ -1,8 +1,8 @@ --- +title: 'Input Stepper: Overview' parts: - Input Stepper - Overview -title: 'Input Stepper: Overview' eleventyNavigation: key: 'Input Stepper: Overview' order: 10 diff --git a/docs/components/input-stepper/use-cases.md b/docs/components/input-stepper/use-cases.md index 1cda48828..33b0bce24 100644 --- a/docs/components/input-stepper/use-cases.md +++ b/docs/components/input-stepper/use-cases.md @@ -1,8 +1,8 @@ --- +title: 'Input Stepper: Use Cases' parts: - Input Stepper - Use Cases -title: 'Input Stepper: Use Cases' eleventyNavigation: key: 'Input Stepper: Use Cases' order: 20 diff --git a/docs/components/input-tel-dropdown/extensions.md b/docs/components/input-tel-dropdown/extensions.md index 601423d62..75535aec5 100644 --- a/docs/components/input-tel-dropdown/extensions.md +++ b/docs/components/input-tel-dropdown/extensions.md @@ -1,8 +1,8 @@ --- +title: 'Input Tel Dropdown: Extensions' parts: - Input Tel Dropdown - Extensions -title: 'Input Tel Dropdown: Extensions' eleventyNavigation: key: 'Input Tel Dropdown: Extensions' order: 30 diff --git a/docs/components/input-tel-dropdown/index.md b/docs/components/input-tel-dropdown/index.md index e3f5eab23..be4bdf665 100644 --- a/docs/components/input-tel-dropdown/index.md +++ b/docs/components/input-tel-dropdown/index.md @@ -1,7 +1,7 @@ --- +title: Input Tel Dropdown parts: - Input Tel Dropdown -title: Input Tel Dropdown eleventyNavigation: key: Input Tel Dropdown order: 20 diff --git a/docs/components/input-tel-dropdown/overview.md b/docs/components/input-tel-dropdown/overview.md index 8815b68c8..40f10ddd5 100644 --- a/docs/components/input-tel-dropdown/overview.md +++ b/docs/components/input-tel-dropdown/overview.md @@ -1,8 +1,8 @@ --- +title: 'Input Tel Dropdown: Overview' parts: - Input Tel Dropdown - Overview -title: 'Input Tel Dropdown: Overview' eleventyNavigation: key: 'Input Tel Dropdown: Overview' order: 10 diff --git a/docs/components/input-tel-dropdown/use-cases.md b/docs/components/input-tel-dropdown/use-cases.md index 9a1432bad..3b699e7e5 100644 --- a/docs/components/input-tel-dropdown/use-cases.md +++ b/docs/components/input-tel-dropdown/use-cases.md @@ -1,8 +1,8 @@ --- +title: 'Input Tel Dropdown: Use Cases' parts: - Input Tel Dropdown - Use Cases -title: 'Input Tel Dropdown: Use Cases' eleventyNavigation: key: 'Input Tel Dropdown: Use Cases' order: 20 diff --git a/docs/components/input-tel/index.md b/docs/components/input-tel/index.md index 53a538e33..212bba2e6 100644 --- a/docs/components/input-tel/index.md +++ b/docs/components/input-tel/index.md @@ -1,7 +1,7 @@ --- +title: Input Tel parts: - Input Tel -title: Input Tel eleventyNavigation: key: Input Tel order: 20 diff --git a/docs/components/input-tel/overview.md b/docs/components/input-tel/overview.md index ab9e2a899..e152725fc 100644 --- a/docs/components/input-tel/overview.md +++ b/docs/components/input-tel/overview.md @@ -1,8 +1,8 @@ --- +title: 'Input Tel: Overview' parts: - Input Tel - Overview -title: 'Input Tel: Overview' eleventyNavigation: key: 'Input Tel: Overview' order: 10 diff --git a/docs/components/input-tel/use-cases.md b/docs/components/input-tel/use-cases.md index 6ad9e7f6a..f932dea97 100644 --- a/docs/components/input-tel/use-cases.md +++ b/docs/components/input-tel/use-cases.md @@ -1,8 +1,8 @@ --- +title: 'Input Tel: Use Cases' parts: - Input Tel - Use Cases -title: 'Input Tel: Use Cases' eleventyNavigation: key: 'Input Tel: Use Cases' order: 20 diff --git a/docs/components/input/index.md b/docs/components/input/index.md index 705f3f971..454e3238a 100644 --- a/docs/components/input/index.md +++ b/docs/components/input/index.md @@ -1,7 +1,7 @@ --- +title: Input parts: - Input -title: Input eleventyNavigation: key: Input order: 20 diff --git a/docs/components/input/overview.md b/docs/components/input/overview.md index 42dfd6a08..59630cdfa 100644 --- a/docs/components/input/overview.md +++ b/docs/components/input/overview.md @@ -1,8 +1,8 @@ --- +title: 'Input: Overview' parts: - Input - Overview -title: 'Input: Overview' eleventyNavigation: key: 'Input: Overview' order: 10 diff --git a/docs/components/input/use-cases.md b/docs/components/input/use-cases.md index b0082fff1..e72269a03 100644 --- a/docs/components/input/use-cases.md +++ b/docs/components/input/use-cases.md @@ -1,8 +1,8 @@ --- +title: 'Input: Use Cases' parts: - Input - Use Cases -title: 'Input: Use Cases' eleventyNavigation: key: 'Input: Use Cases' order: 20 diff --git a/docs/components/listbox/index.md b/docs/components/listbox/index.md index 1b472861f..f38cd3015 100644 --- a/docs/components/listbox/index.md +++ b/docs/components/listbox/index.md @@ -1,7 +1,7 @@ --- +title: Listbox parts: - Listbox -title: Listbox eleventyNavigation: key: Listbox order: 20 diff --git a/docs/components/listbox/overview.md b/docs/components/listbox/overview.md index 12ce0615b..3071e8b92 100644 --- a/docs/components/listbox/overview.md +++ b/docs/components/listbox/overview.md @@ -1,8 +1,8 @@ --- +title: 'Listbox: Overview' parts: - Listbox - Overview -title: 'Listbox: Overview' eleventyNavigation: key: 'Listbox: Overview' order: 10 diff --git a/docs/components/listbox/use-cases.md b/docs/components/listbox/use-cases.md index 8113517c7..8e4cf8f3a 100644 --- a/docs/components/listbox/use-cases.md +++ b/docs/components/listbox/use-cases.md @@ -1,8 +1,8 @@ --- +title: 'Listbox: Use Cases' parts: - Listbox - Use Cases -title: 'Listbox: Use Cases' eleventyNavigation: key: 'Listbox: Use Cases' order: 20 diff --git a/docs/components/pagination/index.md b/docs/components/pagination/index.md index 176172ba6..7e5aa4b07 100644 --- a/docs/components/pagination/index.md +++ b/docs/components/pagination/index.md @@ -1,7 +1,7 @@ --- +title: Pagination parts: - Pagination -title: Pagination eleventyNavigation: key: Pagination order: 30 diff --git a/docs/components/pagination/overview.md b/docs/components/pagination/overview.md index caccabffb..a11fd37a1 100644 --- a/docs/components/pagination/overview.md +++ b/docs/components/pagination/overview.md @@ -1,8 +1,8 @@ --- +title: 'Pagination: Overview' parts: - Pagination - Overview -title: 'Pagination: Overview' eleventyNavigation: key: 'Pagination: Overview' order: 10 diff --git a/docs/components/pagination/use-cases.md b/docs/components/pagination/use-cases.md index 2714636a3..b2b86da80 100644 --- a/docs/components/pagination/use-cases.md +++ b/docs/components/pagination/use-cases.md @@ -1,8 +1,8 @@ --- +title: 'Pagination: Use Cases' parts: - Pagination - Use Cases -title: 'Pagination: Use Cases' eleventyNavigation: key: 'Pagination: Use Cases' order: 20 diff --git a/docs/components/progress-indicator/examples.md b/docs/components/progress-indicator/examples.md index e71e8cc25..45cbf0b61 100644 --- a/docs/components/progress-indicator/examples.md +++ b/docs/components/progress-indicator/examples.md @@ -1,8 +1,8 @@ --- +title: 'Progress Indicator: Examples' parts: - Progress Indicator - Examples -title: 'Progress Indicator: Examples' eleventyNavigation: key: 'Progress Indicator: Examples' order: 30 diff --git a/docs/components/progress-indicator/index.md b/docs/components/progress-indicator/index.md index fa54a055c..6a872da71 100644 --- a/docs/components/progress-indicator/index.md +++ b/docs/components/progress-indicator/index.md @@ -1,7 +1,7 @@ --- +title: Progress Indicator parts: - Progress Indicator -title: Progress Indicator eleventyNavigation: key: Progress Indicator order: 30 diff --git a/docs/components/progress-indicator/overview.md b/docs/components/progress-indicator/overview.md index 8b80794e6..c6bb7f5f7 100644 --- a/docs/components/progress-indicator/overview.md +++ b/docs/components/progress-indicator/overview.md @@ -1,8 +1,8 @@ --- +title: 'Progress Indicator: Overview' parts: - Progress Indicator - Overview -title: 'Progress Indicator: Overview' eleventyNavigation: key: 'Progress Indicator: Overview' order: 10 diff --git a/docs/components/radio-group/index.md b/docs/components/radio-group/index.md index 0b461f3fd..02fbb8040 100644 --- a/docs/components/radio-group/index.md +++ b/docs/components/radio-group/index.md @@ -1,7 +1,7 @@ --- +title: Radio Group parts: - Radio Group -title: Radio Group eleventyNavigation: key: Radio Group order: 30 diff --git a/docs/components/radio-group/overview.md b/docs/components/radio-group/overview.md index 5ffc085a2..8ce6022de 100644 --- a/docs/components/radio-group/overview.md +++ b/docs/components/radio-group/overview.md @@ -1,8 +1,8 @@ --- +title: 'Radio Group: Overview' parts: - Radio Group - Overview -title: 'Radio Group: Overview' eleventyNavigation: key: 'Radio Group: Overview' order: 10 diff --git a/docs/components/radio-group/use-cases.md b/docs/components/radio-group/use-cases.md index e96ce9f8f..97195fa69 100644 --- a/docs/components/radio-group/use-cases.md +++ b/docs/components/radio-group/use-cases.md @@ -1,8 +1,8 @@ --- +title: 'Radio Group: Use Cases' parts: - Radio Group - Use Cases -title: 'Radio Group: Use Cases' eleventyNavigation: key: 'Radio Group: Use Cases' order: 20 diff --git a/docs/components/select-rich/examples.md b/docs/components/select-rich/examples.md index 8521ff7b6..e1bfe1123 100644 --- a/docs/components/select-rich/examples.md +++ b/docs/components/select-rich/examples.md @@ -1,8 +1,8 @@ --- +title: 'Select Rich: Examples' parts: - Select Rich - Examples -title: 'Select Rich: Examples' eleventyNavigation: key: 'Select Rich: Examples' order: 30 diff --git a/docs/components/select-rich/index.md b/docs/components/select-rich/index.md index 8fd9500c2..dc1341964 100644 --- a/docs/components/select-rich/index.md +++ b/docs/components/select-rich/index.md @@ -1,7 +1,7 @@ --- +title: Select Rich parts: - Select Rich -title: Select Rich eleventyNavigation: key: Select Rich order: 40 diff --git a/docs/components/select-rich/overview.md b/docs/components/select-rich/overview.md index d211a79de..a3f28c2ef 100644 --- a/docs/components/select-rich/overview.md +++ b/docs/components/select-rich/overview.md @@ -1,8 +1,8 @@ --- +title: 'Select Rich: Overview' parts: - Select Rich - Overview -title: 'Select Rich: Overview' eleventyNavigation: key: 'Select Rich: Overview' order: 10 diff --git a/docs/components/select-rich/use-cases.md b/docs/components/select-rich/use-cases.md index 8d0d8bb02..c7b52ea5d 100644 --- a/docs/components/select-rich/use-cases.md +++ b/docs/components/select-rich/use-cases.md @@ -1,8 +1,8 @@ --- +title: 'Select Rich: Use Cases' parts: - Select Rich - Use Cases -title: 'Select Rich: Use Cases' eleventyNavigation: key: 'Select Rich: Use Cases' order: 20 diff --git a/docs/components/select/index.md b/docs/components/select/index.md index 53b675f94..7dce9ff96 100644 --- a/docs/components/select/index.md +++ b/docs/components/select/index.md @@ -1,7 +1,7 @@ --- +title: Select parts: - Select -title: Select eleventyNavigation: key: Select order: 40 diff --git a/docs/components/select/overview.md b/docs/components/select/overview.md index a098d35d4..a60ddf2f9 100644 --- a/docs/components/select/overview.md +++ b/docs/components/select/overview.md @@ -1,8 +1,8 @@ --- +title: 'Select: Overview' parts: - Select - Overview -title: 'Select: Overview' eleventyNavigation: key: 'Select: Overview' order: 10 diff --git a/docs/components/select/use-cases.md b/docs/components/select/use-cases.md index 5c9d5a39e..b49541d6c 100644 --- a/docs/components/select/use-cases.md +++ b/docs/components/select/use-cases.md @@ -1,8 +1,8 @@ --- +title: 'Select: Use Cases' parts: - Select - Use Cases -title: 'Select: Use Cases' eleventyNavigation: key: 'Select: Use Cases' order: 20 diff --git a/docs/components/steps/index.md b/docs/components/steps/index.md index 98d5a1f45..681945707 100644 --- a/docs/components/steps/index.md +++ b/docs/components/steps/index.md @@ -1,7 +1,7 @@ --- +title: Steps parts: - Steps -title: Steps eleventyNavigation: key: Steps order: 50 diff --git a/docs/components/steps/overview.md b/docs/components/steps/overview.md index c79f38bc5..0bd2cddfe 100644 --- a/docs/components/steps/overview.md +++ b/docs/components/steps/overview.md @@ -1,8 +1,8 @@ --- +title: 'Steps: Overview' parts: - Steps - Overview -title: 'Steps: Overview' eleventyNavigation: key: 'Steps: Overview' order: 10 diff --git a/docs/components/steps/use-cases.md b/docs/components/steps/use-cases.md index e29af0fe3..5ad2c659d 100644 --- a/docs/components/steps/use-cases.md +++ b/docs/components/steps/use-cases.md @@ -1,8 +1,8 @@ --- +title: 'Steps: Use Cases' parts: - Steps - Use Cases -title: 'Steps: Use Cases' eleventyNavigation: key: 'Steps: Use Cases' order: 20 diff --git a/docs/components/switch/index.md b/docs/components/switch/index.md index aa863a2c1..78d6f88c9 100644 --- a/docs/components/switch/index.md +++ b/docs/components/switch/index.md @@ -1,7 +1,7 @@ --- +title: Switch parts: - Switch -title: Switch eleventyNavigation: key: Switch order: 50 diff --git a/docs/components/switch/overview.md b/docs/components/switch/overview.md index 996c9bec4..110994672 100644 --- a/docs/components/switch/overview.md +++ b/docs/components/switch/overview.md @@ -1,8 +1,8 @@ --- +title: 'Switch: Overview' parts: - Switch - Overview -title: 'Switch: Overview' eleventyNavigation: key: 'Switch: Overview' order: 10 diff --git a/docs/components/switch/reference.md b/docs/components/switch/reference.md index 10adffc09..2e4a47bfa 100644 --- a/docs/components/switch/reference.md +++ b/docs/components/switch/reference.md @@ -1,8 +1,8 @@ --- +title: 'Switch: Reference' parts: - Switch - Reference -title: 'Switch: Reference' eleventyNavigation: key: 'Switch: Reference' order: 30 diff --git a/docs/components/switch/use-cases.md b/docs/components/switch/use-cases.md index 232ef6bef..88d3d9c3e 100644 --- a/docs/components/switch/use-cases.md +++ b/docs/components/switch/use-cases.md @@ -1,8 +1,8 @@ --- +title: 'Switch: Use Cases' parts: - Switch - Use Cases -title: 'Switch: Use Cases' eleventyNavigation: key: 'Switch: Use Cases' order: 20 diff --git a/docs/components/tabs/examples.md b/docs/components/tabs/examples.md index 28d5a1225..231584557 100644 --- a/docs/components/tabs/examples.md +++ b/docs/components/tabs/examples.md @@ -1,8 +1,8 @@ --- +title: 'Tabs: Examples' parts: - Tabs - Examples -title: 'Tabs: Examples' eleventyNavigation: key: 'Tabs: Examples' order: 30 diff --git a/docs/components/tabs/index.md b/docs/components/tabs/index.md index a73cd9767..281c4e691 100644 --- a/docs/components/tabs/index.md +++ b/docs/components/tabs/index.md @@ -1,7 +1,7 @@ --- +title: Tabs parts: - Tabs -title: Tabs eleventyNavigation: key: Tabs order: 50 diff --git a/docs/components/tabs/overview.md b/docs/components/tabs/overview.md index c8a88ea99..66f5f100d 100644 --- a/docs/components/tabs/overview.md +++ b/docs/components/tabs/overview.md @@ -1,8 +1,8 @@ --- +title: 'Tabs: Overview' parts: - Tabs - Overview -title: 'Tabs: Overview' eleventyNavigation: key: 'Tabs: Overview' order: 10 diff --git a/docs/components/tabs/use-cases.md b/docs/components/tabs/use-cases.md index 4862acf81..0a9c45c18 100644 --- a/docs/components/tabs/use-cases.md +++ b/docs/components/tabs/use-cases.md @@ -1,8 +1,8 @@ --- +title: 'Tabs: Use Cases' parts: - Tabs - Use Cases -title: 'Tabs: Use Cases' eleventyNavigation: key: 'Tabs: Use Cases' order: 20 diff --git a/docs/components/textarea/index.md b/docs/components/textarea/index.md index dde37b9a2..53402d2a1 100644 --- a/docs/components/textarea/index.md +++ b/docs/components/textarea/index.md @@ -1,7 +1,7 @@ --- +title: Textarea parts: - Textarea -title: Textarea eleventyNavigation: key: Textarea order: 50 diff --git a/docs/components/textarea/overview.md b/docs/components/textarea/overview.md index 6aada0aa3..78b07a5eb 100644 --- a/docs/components/textarea/overview.md +++ b/docs/components/textarea/overview.md @@ -1,8 +1,8 @@ --- +title: 'Textarea: Overview' parts: - Textarea - Overview -title: 'Textarea: Overview' eleventyNavigation: key: 'Textarea: Overview' order: 10 diff --git a/docs/components/textarea/use-cases.md b/docs/components/textarea/use-cases.md index 82f1f8f03..2e04ea6b1 100644 --- a/docs/components/textarea/use-cases.md +++ b/docs/components/textarea/use-cases.md @@ -1,8 +1,8 @@ --- +title: 'Textarea: Use Cases' parts: - Textarea - Use Cases -title: 'Textarea: Use Cases' eleventyNavigation: key: 'Textarea: Use Cases' order: 20 diff --git a/docs/components/tooltip/examples.md b/docs/components/tooltip/examples.md index c1afe0324..16c7dacba 100644 --- a/docs/components/tooltip/examples.md +++ b/docs/components/tooltip/examples.md @@ -1,8 +1,8 @@ --- +title: 'Tooltip: Examples' parts: - Tooltip - Examples -title: 'Tooltip: Examples' eleventyNavigation: key: 'Tooltip: Examples' order: 30 diff --git a/docs/components/tooltip/index.md b/docs/components/tooltip/index.md index 77d896a04..4e29ee2aa 100644 --- a/docs/components/tooltip/index.md +++ b/docs/components/tooltip/index.md @@ -1,7 +1,7 @@ --- +title: Tooltip parts: - Tooltip -title: Tooltip eleventyNavigation: key: Tooltip order: 60 diff --git a/docs/components/tooltip/overview.md b/docs/components/tooltip/overview.md index fbcdcafd0..a7cf4586e 100644 --- a/docs/components/tooltip/overview.md +++ b/docs/components/tooltip/overview.md @@ -1,8 +1,8 @@ --- +title: 'Tooltip: Overview' parts: - Tooltip - Overview -title: 'Tooltip: Overview' eleventyNavigation: key: 'Tooltip: Overview' order: 10 diff --git a/docs/components/tooltip/use-cases.md b/docs/components/tooltip/use-cases.md index 366e1f397..d98e2af81 100644 --- a/docs/components/tooltip/use-cases.md +++ b/docs/components/tooltip/use-cases.md @@ -1,8 +1,8 @@ --- +title: 'Tooltip: Use Cases' parts: - Tooltip - Use Cases -title: 'Tooltip: Use Cases' eleventyNavigation: key: 'Tooltip: Use Cases' order: 20 diff --git a/package.json b/package.json index 9863f9c2d..d140d0f57 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "build": "npm run build:astro && npm run build:rocket && npm run build:astro:update-links && mv dist _site/next", "build:astro": "ASTRO_BASE_URL=/next npx astro build --force", "build:astro:update-links": "node ./src/utils/rewrite-links.mjs", + "build:clean": "find src/pages -path \"*/_demos/*.js\" -type f -delete && rm -rf node_modules/_lion_docs && npm run build", "build:rocket": "rocket build", "bundlesize": "rollup -c bundlesize/rollup.config.js && bundlesize", "changeset": "changeset", diff --git a/scripts/convertNavigationOrder/convertNavigationOrder.mjs b/scripts/convertNavigationOrder/convertNavigationOrder.mjs index 24ebaa630..2a2b7dae6 100644 --- a/scripts/convertNavigationOrder/convertNavigationOrder.mjs +++ b/scripts/convertNavigationOrder/convertNavigationOrder.mjs @@ -18,7 +18,7 @@ const getTitleLineNumber = content => { }; // since it's a one-time script, the path is just hardcoded -const paths = await globby('docs/fundamentals/**/*.md'); +const paths = await globby('docs/components/**/*.md'); for (const path of paths) { const grayMatterFile = await matter.read(path); diff --git a/scripts/convertNavigationOrder/convertNavigationOrder2.mjs b/scripts/convertNavigationOrder/convertNavigationOrder2.mjs new file mode 100644 index 000000000..2a1fa5e95 --- /dev/null +++ b/scripts/convertNavigationOrder/convertNavigationOrder2.mjs @@ -0,0 +1,50 @@ +import { writeFile } from 'node:fs/promises'; +import { globby } from 'globby'; +import matter from 'gray-matter'; +import { processContentWithTitle } from '@rocket/core/title'; + +// since it's a one-time script, the path is just hardcoded +const paths = await globby('docs/components/**/*.md'); + +const getParts = parts => { + if (parts.length !== 1) { + return parts; + } + + let delimiter = '>'; + if (parts[0].includes(':')) { + delimiter = ':'; + } + + return parts[0].split(delimiter).map(part => part.trim()); +}; + +const getTitle = title => { + let delimiter = '>'; + if (title.includes(':')) { + delimiter = ':'; + } + + return title.split(delimiter).map(part => part.trim())[1]; +}; + +for (const path of paths) { + const grayMatterFile = await matter.read(path); + + // save original values + const { parts, eleventyNavigation, ...rest } = grayMatterFile.data; + + // merge them + const newParts = getParts(parts); + let newTitle = getTitle(eleventyNavigation.title); + if (!newTitle) { + newTitle = eleventyNavigation.title; + } + grayMatterFile.data = { + ...rest, + parts: newParts, + eleventyNavigation: { ...eleventyNavigation, title: newTitle }, + }; + + await writeFile(grayMatterFile.path, matter.stringify(grayMatterFile)); +}