Jaehui-Lee commented on code in PR #7722:
URL: https://github.com/apache/hbase/pull/7722#discussion_r2791449230


##########
hbase-website/scripts/extract-hbase-config.js:
##########
@@ -0,0 +1,222 @@
+#!/usr/bin/env node
+/**
+ * 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.
+ */
+
+import fs from 'fs';
+import path from 'path';
+import { fileURLToPath } from 'url';
+
+/**
+ * Extracts a field value from a property XML block
+ * @param {string} block - The XML block containing property information
+ * @param {string} fieldName - The name of the field to extract
+ * @returns {string} The field value or empty string if not present
+ */
+export function extractField(block, fieldName) {
+  const fieldRegex = new RegExp(`<${fieldName}>(.*?)<\/${fieldName}>`, 's');
+  const fieldMatch = block.match(fieldRegex);
+  return fieldMatch ? fieldMatch[1].trim() : '';
+}
+
+/**
+ * Checks if a property block has skipInDoc attribute set to true
+ * @param {string} block - The full property XML block including the opening 
tag
+ * @returns {boolean} True if the property should be skipped
+ */
+export function shouldSkipProperty(block) {
+  return /skipInDoc\s*=\s*["']true["']/.test(block);
+}
+
+/**
+ * Parses properties from hbase-default.xml content
+ * @param {string} xmlContent - The content of the hbase-default.xml file
+ * @returns {Array<Object>} Array of property objects
+ */
+export function parseProperties(xmlContent) {

Review Comment:
   nit: hbase-default.md has a duplicate entry for 
`hbase.zookeeper.property.initLimit`. This is because `parseProperties()` also 
picks up the example <property> block inside an XML comment in 
hbase-default.xml. How about stripping comments before parsing?



##########
hbase-website/app/pages/_docs/docs/index.tsx:
##########
@@ -0,0 +1,301 @@
+//
+// 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.
+//
+
+import { docs } from "@/.source";
+import { toClientRenderer } from "fumadocs-mdx/runtime/vite";
+import { DocsLayout } from "@/components/docs/layout/docs";
+import {
+  DocsBody as FumaDocsBody,
+  DocsDescription as FumaDocsDescription,
+  DocsPage as FumaDocsPage,
+  DocsTitle as FumaDocsTitle
+} from "@/components/docs/layout/docs/page";
+import defaultMdxComponents from "fumadocs-ui/mdx";

Review Comment:
   nit: A link icon appears on heading hover, but it's not clickable since it 
disappears when moving the cursor toward it. It might be better to just hide it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to