You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "vtlim (via GitHub)" <gi...@apache.org> on 2024/01/04 00:01:32 UTC

[PR] docs: Anchor link checker (druid)

vtlim opened a new pull request, #15624:
URL: https://github.com/apache/druid/pull/15624

   Follows up from https://github.com/apache/druid/pull/15621
   * Restores script that checks anchor links
   * Calls the script in GitHub Actions
   * Fixes a few more links


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] docs: Anchor link checker (druid)

Posted by "vtlim (via GitHub)" <gi...@apache.org>.
vtlim commented on code in PR #15624:
URL: https://github.com/apache/druid/pull/15624#discussion_r1442080233


##########
website/script/link-lint.js:
##########
@@ -0,0 +1,97 @@
+/*
+ * 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.
+ */
+
+const path = require('path');
+const fg = require('fast-glob');
+const fs = require('fs-extra');
+
+const entries = fg.sync(['./build/docs/**/*.html'])

Review Comment:
   ```suggestion
   const entries = fg.sync(['./build/docs/**/*.html']);
   ```



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] docs: Anchor link checker (druid)

Posted by "317brian (via GitHub)" <gi...@apache.org>.
317brian merged PR #15624:
URL: https://github.com/apache/druid/pull/15624


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] docs: Anchor link checker (druid)

Posted by "github-advanced-security[bot] (via GitHub)" <gi...@apache.org>.
github-advanced-security[bot] commented on code in PR #15624:
URL: https://github.com/apache/druid/pull/15624#discussion_r1441128085


##########
website/script/link-lint.js:
##########
@@ -0,0 +1,97 @@
+/*
+ * 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.
+ */
+
+const path = require('path');
+const fg = require('fast-glob');
+const fs = require('fs-extra');
+
+const entries = fg.sync(['./build/docs/**/*.html'])

Review Comment:
   ## Semicolon insertion
   
   Avoid automated semicolon insertion (90% of all statements in [the enclosing script](1) have an explicit semicolon).
   
   [Show more details](https://github.com/apache/druid/security/code-scanning/6409)



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] docs: Anchor link checker (druid)

Posted by "317brian (via GitHub)" <gi...@apache.org>.
317brian commented on code in PR #15624:
URL: https://github.com/apache/druid/pull/15624#discussion_r1445101423


##########
docs/development/docs-contribute.md:
##########
@@ -111,6 +112,10 @@ Provide a name for your feature branch in `MY-BRANCH`.
 5. Use the following commands to run the link and spellcheckers locally: 
    
    ```bash
+   cd website
+   npm install

Review Comment:
   ```suggestion
      # You only need to run install once
      npm install
   ```



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] docs: Anchor link checker (druid)

Posted by "317brian (via GitHub)" <gi...@apache.org>.
317brian commented on code in PR #15624:
URL: https://github.com/apache/druid/pull/15624#discussion_r1445101423


##########
docs/development/docs-contribute.md:
##########
@@ -111,6 +112,10 @@ Provide a name for your feature branch in `MY-BRANCH`.
 5. Use the following commands to run the link and spellcheckers locally: 
    
    ```bash
+   cd website
+   npm install

Review Comment:
   ```suggestion
      # You only need to install once
      npm install
   ```



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] docs: Anchor link checker (druid)

Posted by "317brian (via GitHub)" <gi...@apache.org>.
317brian commented on PR #15624:
URL: https://github.com/apache/druid/pull/15624#issuecomment-1877800453

   For context, what will happen now is that the CI will fail early if Docusaurus cannot build the site because of broken Markdown links between pages. If that passes, the updated script in this PR will also check the anchors (something that docusaurus doesn't do) and will fail if a link to a heading/anchor doesn't exist.


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] docs: Anchor link checker (druid)

Posted by "317brian (via GitHub)" <gi...@apache.org>.
317brian commented on PR #15624:
URL: https://github.com/apache/druid/pull/15624#issuecomment-1877805829

   @vtlim it looks like it's getting built twice: 
   ![image](https://github.com/apache/druid/assets/53799971/0700adfe-fb49-4fe7-881d-7de61bf19424)
   


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org