Merge pull request #70849 from ClickHouse/docs-remove-settings-build

[Docs] Remove autogenerate settings and settings markdowns
This commit is contained in:
Alexey Milovidov 2024-10-19 12:52:30 +00:00 committed by GitHub
commit 95ce7df92f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 5 additions and 12148 deletions

View File

@ -9,7 +9,7 @@ RUN CGO_ENABLED=0 go install github.com/wjdp/htmltest@v${HTMLTEST_VERSION} \
# nodejs 17 prefers ipv6 and is broken in our environment
FROM node:16-alpine
RUN apk add --no-cache git openssh bash curl
RUN apk add --no-cache git openssh bash
# At this point we want to really update /opt/clickhouse-docs directory
# So we reset the cache
@ -33,7 +33,4 @@ RUN mkdir /output_path \
COPY run.sh /run.sh
COPY --from=htmltest-builder /usr/bin/htmltest /usr/bin/htmltest
# Install ClickHouse Local, which is used to auto-generate some doc pages.
RUN curl https://clickhouse.com/ | sh
ENTRYPOINT ["/run.sh"]

View File

@ -21,78 +21,6 @@ do
fi
done
# Generate pages with settings
./clickhouse -q "
WITH
'/ClickHouse/src/Core/Settings.cpp' AS cpp_file,
settings_from_cpp AS
(
SELECT extract(line, 'M\\(\\w+, (\\w+),') AS name
FROM file(cpp_file, LineAsString)
WHERE match(line, '^\\s*M\\(')
),
main_content AS
(
SELECT format('## {} {}\\n\\nType: {}\\n\\nDefault value: {}\\n\\n{}\\n\\n', name, '{#'||name||'}', type, default, trim(BOTH '\\n' FROM description))
FROM system.settings WHERE name IN settings_from_cpp
ORDER BY name
),
'---
sidebar_label: Core Settings
sidebar_position: 2
slug: /en/operations/settings/settings
toc_max_heading_level: 2
---
# Core Settings
All below settings are also available in table [system.settings](/docs/en/operations/system-tables/settings).
' AS prefix
SELECT prefix || (SELECT groupConcat(*) FROM main_content)
INTO OUTFILE '/opt/clickhouse-docs/docs/en/operations/settings/settings.md' TRUNCATE FORMAT LineAsString
"
./clickhouse -q "
WITH
'/ClickHouse/src/Core/FormatFactorySettingsDeclaration.h' AS cpp_file,
settings_from_cpp AS
(
SELECT extract(line, 'M\\(\\w+, (\\w+),') AS name
FROM file(cpp_file, LineAsString)
WHERE match(line, '^\\s*M\\(')
),
main_content AS
(
SELECT format('## {} {}\\n\\nType: {}\\n\\nDefault value: {}\\n\\n{}\\n\\n', name, '{#'||name||'}', type, default, trim(BOTH '\\n' FROM description))
FROM system.settings WHERE name IN settings_from_cpp
ORDER BY name
),
'---
sidebar_label: Format Settings
sidebar_position: 52
slug: /en/operations/settings/formats
toc_max_heading_level: 2
---
# Format settings {#format-settings}
' AS prefix
SELECT prefix || (SELECT groupConcat(*) FROM main_content)
INTO OUTFILE '/opt/clickhouse-docs/docs/en/operations/settings/settings-formats.md' TRUNCATE FORMAT LineAsString
"
# Force build error on wrong symlinks
sed -i '/onBrokenMarkdownLinks:/ s/ignore/error/g' docusaurus.config.js

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff