|
1 | | -// @ts-check |
2 | | -import { defineConfig } from "astro/config"; |
3 | | -import starlight from "@astrojs/starlight"; |
4 | | -import { pluginLineNumbers } from "@expressive-code/plugin-line-numbers"; |
5 | | -import starlightImageZoom from "starlight-image-zoom"; |
6 | | - |
7 | | -const analytics = ` |
8 | | -(function(window, document, dataLayerName, id) { |
9 | | -window[dataLayerName]=window[dataLayerName]||[],window[dataLayerName].push({start:(new Date).getTime(),event:"stg.start"});var scripts=document.getElementsByTagName('script')[0],tags=document.createElement('script'); |
10 | | -function stgCreateCookie(a,b,c){var d="";if(c){var e=new Date;e.setTime(e.getTime()+24*c*60*60*1e3),d="; expires="+e.toUTCString();f="; SameSite=Strict"}document.cookie=a+"="+b+d+f+"; path=/"} |
11 | | -var isStgDebug=(window.location.href.match("stg_debug")||document.cookie.match("stg_debug"))&&!window.location.href.match("stg_disable_debug");stgCreateCookie("stg_debug",isStgDebug?1:"",isStgDebug?14:-1); |
12 | | -var qP=[];dataLayerName!=="dataLayer"&&qP.push("data_layer_name="+dataLayerName),isStgDebug&&qP.push("stg_debug");var qPString=qP.length>0?("?"+qP.join("&")):""; |
13 | | -tags.async=!0,tags.src="https://szoftverhiba.containers.piwik.pro/"+id+".js"+qPString,scripts.parentNode.insertBefore(tags,scripts); |
14 | | -!function(a,n,i){a[n]=a[n]||{};for(var c=0;c<i.length;c++)!function(i){a[n][i]=a[n][i]||{},a[n][i].api=a[n][i].api||function(){var a=[].slice.call(arguments,0);"string"==typeof a[0]&&window[dataLayerName].push({event:n+"."+i+":"+a[0],parameters:[].slice.call(arguments,1)})}}(i[c])}(window,"ppms",["tm","cm"]); |
15 | | -})(window, document, 'dataLayer', '5f92a4a8-87f5-418f-ac6f-1817837888c3'); |
16 | | -`; |
17 | | - |
18 | | -// https://astro.build/config |
19 | | -export default defineConfig({ |
20 | | - site: "https://vscode-elements.github.io", |
21 | | - integrations: [ |
22 | | - starlight({ |
23 | | - title: "VSCode Elements", |
24 | | - social: { |
25 | | - github: "https://github.com/vscode-elements/elements", |
26 | | - }, |
27 | | - favicon: "/favicon.ico", |
28 | | - logo: { |
29 | | - src: "/src/assets/logo.svg", |
30 | | - }, |
31 | | - head: [ |
32 | | - { |
33 | | - tag: "meta", |
34 | | - attrs: { |
35 | | - name: "google-site-verification", |
36 | | - content: "xQEXVaL5aIe6GfMlfVDFzRqf0f4_XgL4son-Lk9RPQM", |
37 | | - }, |
38 | | - }, |
39 | | - { |
40 | | - tag: "script", |
41 | | - attrs: { |
42 | | - type: "text/javascript", |
43 | | - }, |
44 | | - content: analytics, |
45 | | - }, |
46 | | - ], |
47 | | - editLink: { |
48 | | - baseUrl: |
49 | | - "https://github.com/vscode-elements/vscode-elements.github.io/edit/main/", |
50 | | - }, |
51 | | - expressiveCode: { |
52 | | - // @ts-ignore |
53 | | - plugins: [pluginLineNumbers()], |
54 | | - }, |
55 | | - sidebar: [ |
56 | | - { |
57 | | - label: "Guides", |
58 | | - items: [ |
59 | | - // Each item here is one entry in the navigation menu. |
60 | | - { label: "Getting Started", slug: "guides/getting-started" }, |
61 | | - { label: "Working with forms", slug: "guides/working-with-forms" }, |
62 | | - { |
63 | | - label: "Framework integrations", |
64 | | - items: [ |
65 | | - { label: "React", slug: "guides/framework-integrations/react" }, |
66 | | - { label: "Vue", slug: "guides/framework-integrations/vue" }, |
67 | | - ], |
68 | | - }, |
69 | | - ], |
70 | | - collapsed: true, |
71 | | - }, |
72 | | - { |
73 | | - label: "Components", |
74 | | - items: [ |
75 | | - { label: "Badge", slug: "components/badge" }, |
76 | | - { label: "Button", slug: "components/button" }, |
77 | | - { label: "Checkbox", link: "components/checkbox" }, |
78 | | - { label: "CheckboxGroup", link: "components/checkbox-group" }, |
79 | | - { label: "Collapsible", link: "components/collapsible" }, |
80 | | - { label: "ContextMenu", link: "components/context-menu" }, |
81 | | - { |
82 | | - label: "ContextMenuItem", |
83 | | - link: "components/context-menu-item", |
84 | | - }, |
85 | | - { label: "Divider", link: "components/divider" }, |
86 | | - { label: "FormContainer", link: "components/form-container" }, |
87 | | - { label: "FormGroup", link: "components/form-group" }, |
88 | | - { label: "FormHelper", link: "components/form-helper" }, |
89 | | - { label: "Icon", link: "components/icon" }, |
90 | | - { label: "Label", link: "components/label" }, |
91 | | - { label: "MultiSelect", link: "components/multi-select" }, |
92 | | - { label: "Option", link: "components/option" }, |
93 | | - { label: "ProgressRing", link: "components/progress-ring" }, |
94 | | - { label: "Radio", link: "components/radio" }, |
95 | | - { label: "RadioGroup", link: "components/radio-group" }, |
96 | | - { label: "Scrollable", link: "components/scrollable" }, |
97 | | - { label: "SingleSelect", link: "components/single-select" }, |
98 | | - { label: "SplitLayout", link: "components/split-layout" }, |
99 | | - { label: "TabHeader", link: "components/tab-header" }, |
100 | | - { label: "TabPanel", link: "components/tab-panel" }, |
101 | | - { label: "Table", link: "components/table" }, |
102 | | - { label: "TableBody", link: "components/table-body" }, |
103 | | - { label: "TableCell", link: "components/table-cell" }, |
104 | | - { label: "TableHeader", link: "components/table-header" }, |
105 | | - { label: "TableHeaderCell", link: "components/table-header-cell" }, |
106 | | - { label: "TableRow", link: "components/table-row" }, |
107 | | - { label: "Tabs", link: "components/tabs" }, |
108 | | - { label: "Textarea", link: "components/textarea" }, |
109 | | - { label: "Textfield", link: "components/textfield" }, |
110 | | - { label: "ToolbarButton", link: "components/toolbar-button" }, |
111 | | - { label: "ToolbarContainer", link: "components/toolbar-container" }, |
112 | | - { label: "Tree", link: "components/tree" }, |
113 | | - ], |
114 | | - collapsed: true, |
115 | | - }, |
116 | | - { |
117 | | - label: "API", |
118 | | - items: [ |
119 | | - { label: "Badge", link: "components/badge/api" }, |
120 | | - { label: "Button", link: "components/button/api" }, |
121 | | - { label: "Checkbox", link: "components/checkbox/api" }, |
122 | | - { label: "CheckboxGroup", link: "components/checkbox-group/api" }, |
123 | | - { label: "Collapsible", link: "components/collapsible/api" }, |
124 | | - { label: "ContextMenu", link: "components/context-menu/api" }, |
125 | | - { |
126 | | - label: "ContextMenuItem", |
127 | | - link: "components/context-menu-item/api", |
128 | | - }, |
129 | | - { label: "Divider", link: "components/divider/api" }, |
130 | | - { label: "FormContainer", link: "components/form-container/api" }, |
131 | | - { label: "FormGroup", link: "components/form-group/api" }, |
132 | | - { label: "FormHelper", link: "components/form-helper/api" }, |
133 | | - { label: "Icon", link: "components/icon/api" }, |
134 | | - { label: "Label", link: "components/label/api" }, |
135 | | - { label: "MultiSelect", link: "components/multi-select/api" }, |
136 | | - { label: "Option", link: "components/option/api" }, |
137 | | - { label: "ProgressRing", link: "components/progress-ring/api" }, |
138 | | - { label: "Radio", link: "components/radio/api" }, |
139 | | - { label: "RadioGroup", link: "components/radio-group/api" }, |
140 | | - { label: "Scrollable", link: "components/scrollable/api" }, |
141 | | - { label: "SingleSelect", link: "components/single-select/api" }, |
142 | | - { label: "SplitLayout", link: "components/split-layout/api" }, |
143 | | - { label: "TabHeader", link: "components/tab-header/api" }, |
144 | | - { label: "TabPanel", link: "components/tab-panel/api" }, |
145 | | - { label: "Table", link: "components/table/api" }, |
146 | | - { label: "TableBody", link: "components/table-body/api" }, |
147 | | - { label: "TableCell", link: "components/table-cell/api" }, |
148 | | - { label: "TableHeader", link: "components/table-header/api" }, |
149 | | - { |
150 | | - label: "TableHeaderCell", |
151 | | - link: "components/table-header-cell/api", |
152 | | - }, |
153 | | - { label: "TableRow", link: "components/table-row/api" }, |
154 | | - { label: "Tabs", link: "components/tabs/api" }, |
155 | | - { label: "Textarea", link: "components/textarea/api" }, |
156 | | - { label: "Textfield", link: "components/textfield/api" }, |
157 | | - { label: "ToolbarButton", link: "components/toolbar-button/api" }, |
158 | | - { label: "ToolbarContainer", link: "components/toolbar-container/api" }, |
159 | | - { label: "Tree", link: "components/tree/api" }, |
160 | | - ], |
161 | | - collapsed: true, |
162 | | - }, |
163 | | - ], |
164 | | - customCss: [ |
165 | | - "./src/styles/restore-defaults.css", |
166 | | - "./src/styles/custom.css", |
167 | | - ], |
168 | | - plugins: [starlightImageZoom()], |
169 | | - }), |
170 | | - ], |
171 | | -}); |
| 1 | +// @ts-check |
| 2 | +import { defineConfig } from "astro/config"; |
| 3 | +import starlight from "@astrojs/starlight"; |
| 4 | +import { pluginLineNumbers } from "@expressive-code/plugin-line-numbers"; |
| 5 | +import starlightImageZoom from "starlight-image-zoom"; |
| 6 | + |
| 7 | +const analytics = ` |
| 8 | +(function(window, document, dataLayerName, id) { |
| 9 | +window[dataLayerName]=window[dataLayerName]||[],window[dataLayerName].push({start:(new Date).getTime(),event:"stg.start"});var scripts=document.getElementsByTagName('script')[0],tags=document.createElement('script'); |
| 10 | +function stgCreateCookie(a,b,c){var d="";if(c){var e=new Date;e.setTime(e.getTime()+24*c*60*60*1e3),d="; expires="+e.toUTCString();f="; SameSite=Strict"}document.cookie=a+"="+b+d+f+"; path=/"} |
| 11 | +var isStgDebug=(window.location.href.match("stg_debug")||document.cookie.match("stg_debug"))&&!window.location.href.match("stg_disable_debug");stgCreateCookie("stg_debug",isStgDebug?1:"",isStgDebug?14:-1); |
| 12 | +var qP=[];dataLayerName!=="dataLayer"&&qP.push("data_layer_name="+dataLayerName),isStgDebug&&qP.push("stg_debug");var qPString=qP.length>0?("?"+qP.join("&")):""; |
| 13 | +tags.async=!0,tags.src="https://szoftverhiba.containers.piwik.pro/"+id+".js"+qPString,scripts.parentNode.insertBefore(tags,scripts); |
| 14 | +!function(a,n,i){a[n]=a[n]||{};for(var c=0;c<i.length;c++)!function(i){a[n][i]=a[n][i]||{},a[n][i].api=a[n][i].api||function(){var a=[].slice.call(arguments,0);"string"==typeof a[0]&&window[dataLayerName].push({event:n+"."+i+":"+a[0],parameters:[].slice.call(arguments,1)})}}(i[c])}(window,"ppms",["tm","cm"]); |
| 15 | +})(window, document, 'dataLayer', '5f92a4a8-87f5-418f-ac6f-1817837888c3'); |
| 16 | +`; |
| 17 | + |
| 18 | +// https://astro.build/config |
| 19 | +export default defineConfig({ |
| 20 | + site: "https://vscode-elements.github.io", |
| 21 | + integrations: [ |
| 22 | + starlight({ |
| 23 | + title: "VSCode Elements", |
| 24 | + social: [ |
| 25 | + { |
| 26 | + icon: "github", |
| 27 | + label: "GitHub", |
| 28 | + href: "https://github.com/vscode-elements/elements", |
| 29 | + }, |
| 30 | + ], |
| 31 | + favicon: "/favicon.ico", |
| 32 | + logo: { |
| 33 | + src: "/src/assets/logo.svg", |
| 34 | + }, |
| 35 | + head: [ |
| 36 | + { |
| 37 | + tag: "meta", |
| 38 | + attrs: { |
| 39 | + name: "google-site-verification", |
| 40 | + content: "xQEXVaL5aIe6GfMlfVDFzRqf0f4_XgL4son-Lk9RPQM", |
| 41 | + }, |
| 42 | + }, |
| 43 | + { |
| 44 | + tag: "script", |
| 45 | + attrs: { |
| 46 | + type: "text/javascript", |
| 47 | + }, |
| 48 | + content: analytics, |
| 49 | + }, |
| 50 | + ], |
| 51 | + editLink: { |
| 52 | + baseUrl: |
| 53 | + "https://github.com/vscode-elements/vscode-elements.github.io/edit/main/", |
| 54 | + }, |
| 55 | + expressiveCode: { |
| 56 | + // @ts-ignore |
| 57 | + plugins: [pluginLineNumbers()], |
| 58 | + }, |
| 59 | + sidebar: [ |
| 60 | + { |
| 61 | + label: "Guides", |
| 62 | + items: [ |
| 63 | + // Each item here is one entry in the navigation menu. |
| 64 | + { label: "Getting Started", slug: "guides/getting-started" }, |
| 65 | + { label: "Working with forms", slug: "guides/working-with-forms" }, |
| 66 | + { |
| 67 | + label: "Framework integrations", |
| 68 | + items: [ |
| 69 | + { label: "React", slug: "guides/framework-integrations/react" }, |
| 70 | + { label: "Vue", slug: "guides/framework-integrations/vue" }, |
| 71 | + ], |
| 72 | + }, |
| 73 | + ], |
| 74 | + collapsed: true, |
| 75 | + }, |
| 76 | + { |
| 77 | + label: "Components", |
| 78 | + items: [ |
| 79 | + { label: "Badge", slug: "components/badge" }, |
| 80 | + { label: "Button", slug: "components/button" }, |
| 81 | + { label: "Checkbox", link: "components/checkbox" }, |
| 82 | + { label: "CheckboxGroup", link: "components/checkbox-group" }, |
| 83 | + { label: "Collapsible", link: "components/collapsible" }, |
| 84 | + { label: "ContextMenu", link: "components/context-menu" }, |
| 85 | + { |
| 86 | + label: "ContextMenuItem", |
| 87 | + link: "components/context-menu-item", |
| 88 | + }, |
| 89 | + { label: "Divider", link: "components/divider" }, |
| 90 | + { label: "FormContainer", link: "components/form-container" }, |
| 91 | + { label: "FormGroup", link: "components/form-group" }, |
| 92 | + { label: "FormHelper", link: "components/form-helper" }, |
| 93 | + { label: "Icon", link: "components/icon" }, |
| 94 | + { label: "Label", link: "components/label" }, |
| 95 | + { label: "MultiSelect", link: "components/multi-select" }, |
| 96 | + { label: "Option", link: "components/option" }, |
| 97 | + { label: "ProgressRing", link: "components/progress-ring" }, |
| 98 | + { label: "Radio", link: "components/radio" }, |
| 99 | + { label: "RadioGroup", link: "components/radio-group" }, |
| 100 | + { label: "Scrollable", link: "components/scrollable" }, |
| 101 | + { label: "SingleSelect", link: "components/single-select" }, |
| 102 | + { label: "SplitLayout", link: "components/split-layout" }, |
| 103 | + { label: "TabHeader", link: "components/tab-header" }, |
| 104 | + { label: "TabPanel", link: "components/tab-panel" }, |
| 105 | + { label: "Table", link: "components/table" }, |
| 106 | + { label: "TableBody", link: "components/table-body" }, |
| 107 | + { label: "TableCell", link: "components/table-cell" }, |
| 108 | + { label: "TableHeader", link: "components/table-header" }, |
| 109 | + { label: "TableHeaderCell", link: "components/table-header-cell" }, |
| 110 | + { label: "TableRow", link: "components/table-row" }, |
| 111 | + { label: "Tabs", link: "components/tabs" }, |
| 112 | + { label: "Textarea", link: "components/textarea" }, |
| 113 | + { label: "Textfield", link: "components/textfield" }, |
| 114 | + { label: "ToolbarButton", link: "components/toolbar-button" }, |
| 115 | + { label: "ToolbarContainer", link: "components/toolbar-container" }, |
| 116 | + { label: "Tree", link: "components/tree" }, |
| 117 | + ], |
| 118 | + collapsed: true, |
| 119 | + }, |
| 120 | + { |
| 121 | + label: "API", |
| 122 | + items: [ |
| 123 | + { label: "Badge", link: "components/badge/api" }, |
| 124 | + { label: "Button", link: "components/button/api" }, |
| 125 | + { label: "Checkbox", link: "components/checkbox/api" }, |
| 126 | + { label: "CheckboxGroup", link: "components/checkbox-group/api" }, |
| 127 | + { label: "Collapsible", link: "components/collapsible/api" }, |
| 128 | + { label: "ContextMenu", link: "components/context-menu/api" }, |
| 129 | + { |
| 130 | + label: "ContextMenuItem", |
| 131 | + link: "components/context-menu-item/api", |
| 132 | + }, |
| 133 | + { label: "Divider", link: "components/divider/api" }, |
| 134 | + { label: "FormContainer", link: "components/form-container/api" }, |
| 135 | + { label: "FormGroup", link: "components/form-group/api" }, |
| 136 | + { label: "FormHelper", link: "components/form-helper/api" }, |
| 137 | + { label: "Icon", link: "components/icon/api" }, |
| 138 | + { label: "Label", link: "components/label/api" }, |
| 139 | + { label: "MultiSelect", link: "components/multi-select/api" }, |
| 140 | + { label: "Option", link: "components/option/api" }, |
| 141 | + { label: "ProgressRing", link: "components/progress-ring/api" }, |
| 142 | + { label: "Radio", link: "components/radio/api" }, |
| 143 | + { label: "RadioGroup", link: "components/radio-group/api" }, |
| 144 | + { label: "Scrollable", link: "components/scrollable/api" }, |
| 145 | + { label: "SingleSelect", link: "components/single-select/api" }, |
| 146 | + { label: "SplitLayout", link: "components/split-layout/api" }, |
| 147 | + { label: "TabHeader", link: "components/tab-header/api" }, |
| 148 | + { label: "TabPanel", link: "components/tab-panel/api" }, |
| 149 | + { label: "Table", link: "components/table/api" }, |
| 150 | + { label: "TableBody", link: "components/table-body/api" }, |
| 151 | + { label: "TableCell", link: "components/table-cell/api" }, |
| 152 | + { label: "TableHeader", link: "components/table-header/api" }, |
| 153 | + { |
| 154 | + label: "TableHeaderCell", |
| 155 | + link: "components/table-header-cell/api", |
| 156 | + }, |
| 157 | + { label: "TableRow", link: "components/table-row/api" }, |
| 158 | + { label: "Tabs", link: "components/tabs/api" }, |
| 159 | + { label: "Textarea", link: "components/textarea/api" }, |
| 160 | + { label: "Textfield", link: "components/textfield/api" }, |
| 161 | + { label: "ToolbarButton", link: "components/toolbar-button/api" }, |
| 162 | + { |
| 163 | + label: "ToolbarContainer", |
| 164 | + link: "components/toolbar-container/api", |
| 165 | + }, |
| 166 | + { label: "Tree", link: "components/tree/api" }, |
| 167 | + ], |
| 168 | + collapsed: true, |
| 169 | + }, |
| 170 | + ], |
| 171 | + customCss: [ |
| 172 | + "./src/styles/restore-defaults.css", |
| 173 | + "./src/styles/custom.css", |
| 174 | + ], |
| 175 | + plugins: [starlightImageZoom()], |
| 176 | + }), |
| 177 | + ], |
| 178 | +}); |
0 commit comments