Skip to content

Commit e2579b7

Browse files
authored
Merge pull request #3224 from Blargian/improve_site_vitals
Improve site performance metrics
2 parents e93e502 + 345ff8c commit e2579b7

File tree

16 files changed

+3444
-2251
lines changed

16 files changed

+3444
-2251
lines changed

docusaurus.config.js

Lines changed: 39 additions & 2102 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "new-nav-docusaurus-2-2",
2+
"name": "clickhouse-docs",
33
"version": "0.0.0",
44
"private": true,
55
"config": {
@@ -8,7 +8,7 @@
88
"autogen_needed_files": "src/Core/FormatFactorySettings.h src/Core/Settings.cpp CHANGELOG.md"
99
},
1010
"scripts": {
11-
"build": "yarn copy-clickhouse-repo-docs && yarn generate-changelog && yarn autogenerate-settings && yarn build-api-doc && yarn build-swagger && docusaurus build",
11+
"build": "yarn copy-clickhouse-repo-docs && yarn generate-changelog && yarn autogenerate-settings && yarn build-api-doc && yarn build-swagger && GENERATE_SOURCEMAP=false docusaurus build",
1212
"clear": "docusaurus clear && bash ./placeholderReset.sh",
1313
"deploy": "docusaurus deploy",
1414
"docusaurus": "docusaurus",
@@ -19,15 +19,15 @@
1919
"prep-from-local": "bash ./scripts/copy-clickhouse-repo-docs.sh -l $1",
2020
"autogenerate-settings": "bash ./scripts/settings/autogenerate-settings.sh",
2121
"generate-changelog": "bash ./scripts/generate-changelog.sh",
22-
"new-build": "yarn copy-clickhouse-repo-docs && yarn generate-changelog && yarn autogenerate-settings && yarn build-api-doc && yarn build-swagger && docusaurus build",
22+
"new-build": "yarn copy-clickhouse-repo-docs && yarn generate-changelog && yarn autogenerate-settings && yarn build-api-doc && yarn build-swagger && GENERATE_SOURCEMAP=false docusaurus build",
2323
"start": "docusaurus start",
2424
"swizzle": "docusaurus swizzle",
2525
"write-heading-ids": "docusaurus write-heading-ids",
2626
"run-indexer": "bash ./scripts/search/run_indexer.sh"
2727
},
2828
"dependencies": {
2929
"@docusaurus/core": "3.7.0",
30-
"@docusaurus/plugin-client-redirects": "3.7.0",
30+
"@docusaurus/faster": "^3.7.0",
3131
"@docusaurus/preset-classic": "3.7.0",
3232
"@docusaurus/theme-mermaid": "3.7.0",
3333
"@docusaurus/theme-search-algolia": "^3.7.0",
@@ -40,9 +40,7 @@
4040
"esbuild-loader": "^4.0.3",
4141
"flexsearch": "^0.7.43",
4242
"gray-matter": "^4.0.3",
43-
"hast-util-is-element": "1.1.0",
4443
"http-proxy-middleware": "3.0.3",
45-
"katex": "^0.16.21",
4644
"node-fetch": "^3.3.2",
4745
"prism-react-renderer": "^2.4.1",
4846
"react": "^18.2.0",
@@ -60,7 +58,6 @@
6058
"@docusaurus/module-type-aliases": "3.7.0",
6159
"@playwright/test": "^1.49.1",
6260
"@types/react": "^19.0.4",
63-
"cheerio": "^1.0.0",
6461
"rsync": "^0.6.1",
6562
"typescript": "^5.7.3"
6663
},

src/css/colors.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
--click-color-button-text-disabled: var(--palette_neutral_500);
115115

116116
--click-color-table-header-background: var(--palette_slate_50);
117-
--click-color-table-header-text: var(var(--palette_slate_900));
117+
--click-color-table-header-text: var(--palette_slate_900);
118118
--click-color-table-row-background: var(--palette_neutral_0);
119119
--click-color-table-row-text: var(--palette_slate_900);
120120
--click-color-table-cell-stroke: var(--palette_slate_100);

src/css/custom.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
@use "default";
33
@use "home";
44

5+
/* KaTeX renders the input twice by default, once in HTML and one in MathML */
6+
.katex-html {
7+
display: none;
8+
}
9+
510
html[data-theme="dark"] {
611
background: var(--click-color-background);
712
background-attachment: fixed;

src/css/default.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,3 +157,4 @@
157157
--ifm-menu-link-sublist-icon: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11.9988 9.21211L16.2363 13.4684L15.4488 14.2559L11.9988 10.8059L8.54883 14.2559L7.76133 13.4684L11.9988 9.21211Z' fill='%23E2E3E7' /%3E%3Cpath d='M11.9988 9.21211L16.2363 13.4684L15.4488 14.2559L11.9988 10.8059L8.54883 14.2559L7.76133 13.4684L11.9988 9.21211Z' fill='black' fill-opacity='0.2'/%3E%3C/svg%3E");
158158

159159
}
160+

src/css/home.scss

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
/* Hide breadcrumbs for home page */
22
.docs-doc-id-home-page .breadcrumbs {
3-
display: none;
3+
display: none;
44
}
5-
5+
66
.docs-doc-id-home-page .docItemCol_src-theme-DocItem-Layout-styles-module {
7-
max-width: 100vw;
8-
overflow-x: hidden;
7+
max-width: 100vw;
8+
overflow-x: hidden;
99

10-
@media (min-width: 768px) {
11-
max-width: 100% !important;
12-
}
10+
@media (min-width: 768px) {
11+
max-width: 100% !important;
12+
}
1313
}
1414

1515
.docs-doc-id-home-page .container {
16-
margin-left: 0;
17-
margin-right: 0;
18-
max-width: 100%;
19-
padding-bottom: 0;
16+
margin-left: 0;
17+
margin-right: 0;
18+
max-width: 100%;
19+
padding-bottom: 0;
2020

21-
@media (min-width: 768px) {
22-
overflow-x: auto;
23-
}
21+
@media (min-width: 768px) {
22+
overflow-x: auto;
23+
}
2424
}
2525

2626
.docs-doc-id-home-page .main-content-wrapper {
27-
margin-top: 0;
27+
margin-top: 0;
2828
}
2929

3030
.docs-doc-id-home-page .docItemCol_src-theme-DocItem-Layout-styles-module {
@@ -41,18 +41,18 @@
4141
padding-left: 1rem;
4242
padding-right: 1rem;
4343
}
44-
44+
4545
.home-page-hero {
46-
border-bottom: 1px solid var(--click-color-stroke);
47-
display: flex;
48-
flex-direction: column;
49-
padding-bottom: 2rem;
46+
border-bottom: 1px solid var(--click-color-stroke);
47+
display: flex;
48+
flex-direction: column;
49+
padding-bottom: 2rem;
5050

51-
@media (min-width: 768px) {
52-
flex-direction: row;
53-
padding-top: 4rem;
54-
padding-bottom: 4rem;
55-
}
51+
@media (min-width: 768px) {
52+
flex-direction: row;
53+
padding-top: 4rem;
54+
padding-bottom: 4rem;
55+
}
5656
}
5757

5858
.home-page-hero-left {
@@ -88,7 +88,7 @@
8888
margin-bottom: 1rem;
8989
width: 100%;
9090

91-
@media (min-width: 768px) {
91+
@media (min-width: 768px) {
9292
margin-right: 24px;
9393
margin-bottom: 0;
9494
width: 200px;
@@ -241,3 +241,4 @@ img.home-svg svg path {
241241
padding-left: 4rem !important;
242242
}
243243
}
244+

src/hooks/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import useDebounce from './useDebounce'
2-
import useThrottle from './useThrottle'
31
import useClickOutside from './useClickOutside'
42

5-
export { useDebounce, useThrottle, useClickOutside }
3+
export { useClickOutside }

src/hooks/useDebounce.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/hooks/useThrottle.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/theme/CodeBlock/Container/styles.module.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@
88
--ifm-pre-color: var(--prism-color);
99
overflow-x: scroll;
1010
}
11+

0 commit comments

Comments
 (0)