Skip to content

Commit 011a060

Browse files
committed
chore: add pagefind & ignore code regions
1 parent fe679da commit 011a060

File tree

7 files changed

+134
-46
lines changed

7 files changed

+134
-46
lines changed

apps/docs/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"scripts": {
66
"dev": "next dev",
77
"build": "next build",
8+
"postbuild": "pagefind --site dist --output-path dist/_pagefind",
89
"start": "npx serve dist"
910
},
1011
"dependencies": {
@@ -30,6 +31,7 @@
3031
"@types/node": "^20.11.6",
3132
"@types/react": "^18.2.43",
3233
"@unocss/postcss": "^66.0.0",
34+
"pagefind": "^1.3.0",
3335
"raw-loader": "^4.0.2",
3436
"rehype-mdx-code-props": "^3.0.1",
3537
"string-replace-loader": "^3.1.0",

apps/docs/src/components/code/DocsProvider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const DocsProvider = ({
1919

2020
return (
2121
// ensures docs container styles change according to theme
22-
<div id={id} className={className}>
22+
<div id={id} className={className} data-pagefind-ignore>
2323
<HvProvider
2424
themes={[pentahoPlus, ds5, ds3]}
2525
theme={docsTheme}

apps/docs/src/components/code/ExpandableLayout.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ export const ExpandableLayout = ({ scope, code }: ExpandableLayoutProps) => {
3030
});
3131

3232
return (
33-
<section className="relative mt-md border-border rounded-round">
33+
<section
34+
data-pagefind-ignore
35+
className="relative mt-md border-border rounded-round"
36+
>
3437
{/* Compact Controls */}
3538
<ExpandableControls
3639
onToggle={() => setIsExpanded((prev) => !prev)}
@@ -51,7 +54,7 @@ export const ExpandableLayout = ({ scope, code }: ExpandableLayoutProps) => {
5154

5255
{/* Code Editor Section */}
5356
<div
54-
className="max-h-400px overflow-auto rounded-b-inherit -mt-xxs transition-max-height border-color-inherit"
57+
className="overflow-auto rounded-b-inherit -mt-xxs transition-max-height border-color-inherit"
5558
style={{
5659
maxHeight: isExpanded ? 400 : 0,
5760
}}

apps/docs/src/components/code/Playground.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,11 @@ export const Playground = ({
104104
);
105105

106106
return (
107-
<section className="[&>*]:border-border" aria-label="Playground">
107+
<section
108+
data-pagefind-ignore
109+
className="[&>*]:border-border"
110+
aria-label="Playground"
111+
>
108112
{/* Component preview and controls */}
109113
<div className="grid grid-cols-[2fr_1fr] border rounded-t-round">
110114
{/* Preview Area */}

apps/docs/src/components/code/PopupLayout.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export const PopupLayout = ({ id, scope, code }: PopupLayoutProps) => {
4949
return (
5050
<section
5151
id={id}
52+
data-pagefind-ignore
5253
className="bg-transparent relative border-border border-1 border-t-0 -ml-px h-full"
5354
>
5455
<HvDialog

apps/docs/src/components/code/ToggableLayout.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ export const ToggableLayout = ({ title, scope, code }: ToggableLayoutProps) => {
3737
};
3838

3939
return (
40-
<>
41-
<div className={clsx("flex justify-between items-center mb-2")}>
40+
<section data-pagefind-ignore>
41+
<div className="flex justify-between items-center mb-xs">
4242
{/* Title */}
4343
<HvTypography variant="title4">{title}</HvTypography>
4444

@@ -95,6 +95,6 @@ export const ToggableLayout = ({ title, scope, code }: ToggableLayoutProps) => {
9595
)}
9696
</>
9797
)}
98-
</>
98+
</section>
9999
);
100100
};

package-lock.json

Lines changed: 117 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)