mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Merge pull request #35061 from flickerbox/crb-add-cloud-redirect
Add redirect for cloud page
This commit is contained in:
commit
b46b65ab06
@ -6,6 +6,7 @@ changelog/2017.md whats-new/changelog/2017.md
|
||||
changelog/2018.md whats-new/changelog/2018.md
|
||||
changelog/2019.md whats-new/changelog/2019.md
|
||||
changelog/index.md whats-new/changelog/index.md
|
||||
commercial/cloud.md https://clickhouse.com/cloud/
|
||||
data_types/array.md sql-reference/data-types/array.md
|
||||
data_types/boolean.md sql-reference/data-types/boolean.md
|
||||
data_types/date.md sql-reference/data-types/date.md
|
||||
|
@ -31,7 +31,12 @@ def build_redirect_html(args, base_prefix, lang, output_dir, from_path, to_path)
|
||||
from_path.replace('/index.md', '/index.html').replace('.md', '/index.html')
|
||||
)
|
||||
target_path = to_path.replace('/index.md', '/').replace('.md', '/')
|
||||
|
||||
if target_path[0:7] != 'http://' and target_path[0:8] != 'https://':
|
||||
to_url = f'/{base_prefix}/{lang}/{target_path}'
|
||||
else:
|
||||
to_url = target_path
|
||||
|
||||
to_url = to_url.strip()
|
||||
write_redirect_html(out_path, to_url)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user