From 0a465adea776691e8f610cd6f2814c601b8b5c10 Mon Sep 17 00:00:00 2001 From: "Wang, Fei" Date: Wed, 30 Jul 2025 10:33:07 +0800 Subject: [PATCH] [CELEBORN-2087] Refine the docs configuration table view ### What changes were proposed in this pull request? Enhance the docs configuration view. ### Why are the changes needed? Currently, it is hard for me to review the config items, I have to scroll for every config item. https://celeborn.apache.org/docs/latest/configuration/#master image ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? ``` mkdocs server ``` image Closes #3399 from turboFei/celeborn_config. Authored-by: Wang, Fei Signed-off-by: SteNicholas --- docs/assets/css/custom.css | 51 ++++++++++++++++++++++++++++++++++++++ mkdocs.yml | 3 +++ 2 files changed, 54 insertions(+) create mode 100644 docs/assets/css/custom.css diff --git a/docs/assets/css/custom.css b/docs/assets/css/custom.css new file mode 100644 index 000000000..e570ca4d6 --- /dev/null +++ b/docs/assets/css/custom.css @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +.md-typeset__table { + width: 100%; + /* Allow horizontal overflow content to be visible instead of clipped or scrollable */ + overflow-x: visible; +} + +.md-typeset__table table { + table-layout: fixed; + width: 100%; + word-wrap: break-word; + white-space: normal; +} + +.md-typeset__table td, +.md-typeset__table th { + word-break: break-word; + white-space: normal; +} + +.md-typeset__table tr { + background-color: white; +} + +.md-typeset__table th:nth-child(1), +.md-typeset__table td:nth-child(1) { + width: 30%; +} + +/* Set a different background color for even rows so that the row + color alternates. + */ +.md-typeset__table tr:nth-child(2n) { + background-color: #F1F4F5; +} diff --git a/mkdocs.yml b/mkdocs.yml index a61f17ba1..d30465813 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -52,6 +52,9 @@ extra: social: - icon: fontawesome/brands/github +extra_css: + - assets/css/custom.css + copyright: >
Copyright © 2022-2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0.