Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 37 additions & 1 deletion docusaurus.config.en.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,42 @@ const config = {
},
};
},
// Webpack optimization plugin for large sites
function webpackOptimizationPlugin(context, options) {
return {
name: 'webpack-optimization-plugin',
configureWebpack(config, isServer) {

const isVercel = process.env.VERCEL === '1';

if (!isServer && isVercel) {
return {
optimization: {
splitChunks: {
chunks: 'all',
cacheGroups: {
vendor: {
chunks: 'all',
test: /node_modules/,
priority: 20,
},
common: {
minChunks: 2,
chunks: 'all',
priority: 10,
reuseExistingChunk: true,
enforce: true,
},
},
maxSize: 244000,
},
},
};
}
return {};
},
};
},
// [
// N.B - If you need to redirect a page please do so from vercel.json
// '@docusaurus/plugin-client-redirects',
Expand Down Expand Up @@ -371,7 +407,7 @@ const config = {
]
],
customFields: {
blogSidebarLink: "/docs/knowledgebase", // Used for KB article page
blogSidebarLink: "/docs/knowledgebase",
galaxyApiEndpoint:
process.env.NEXT_PUBLIC_GALAXY_API_ENDPOINT || "http://localhost:3000",
},
Expand Down
3 changes: 3 additions & 0 deletions scripts/changelog/cloud-changelog-rss.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#!/bin/bash

# Configuration
export LC_ALL=C
export LANG=C

CHANGELOG_FILE="docs/cloud/reference/01_changelog/01_changelog.md"
OUTPUT_FILE="static/cloud/changelog-rss.xml"
FEED_URL="https://clickhouse.com/docs/cloud/changelog-rss.xml"
Expand Down
4 changes: 2 additions & 2 deletions src/components/CodeViewer/CodeInterpreter.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Button, Icon, RadioGroup, Tooltip } from '@clickhouse/click-ui/bundled'
import { createClient as createWebClient } from '@clickhouse/client-web'
import JSON5 from 'json5'
import json5 from 'json5';
import { useEffect, useState } from 'react'
import short from 'short-uuid'
import CodeResults, { DefaultView } from './CodeResults'
Expand Down Expand Up @@ -90,7 +90,7 @@ function CodeInterpreter({
params.forEach((param) => {
if (param.type && /^(Array|Map|Tuple|Nested)/.test(param.type)) {
try {
query_params[param.name] = JSON5.parse(param.value)
query_params[param.name] = json5.parse(param.value)
} catch (e) {
// just send and let clickhouse error
query_params[param.name] = param.value
Expand Down
2 changes: 1 addition & 1 deletion src/css/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1458,7 +1458,7 @@ input::-ms-input-placeholder { /* Microsoft Edge */
display: flex;
}

@media (max-width: breakpoints.$laptop-breakpoint) {
@media (max-width: #{breakpoints.$laptop-breakpoint}) {
.installContainer {
flex-wrap: wrap;
}
Expand Down