You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/02/22 06:14:13 UTC

[GitHub] [apisix] tzssangglass commented on a change in pull request #6321: docs: automatic generate PDK docs by LDoc

tzssangglass commented on a change in pull request #6321:
URL: https://github.com/apache/apisix/pull/6321#discussion_r811606360



##########
File path: autodocs/generate.sh
##########
@@ -18,27 +18,30 @@
 
 set -ex
 
-install_dependencies() {
+# workdir is the root of the apisix, use command: autodocs/generate.sh build to generate the docs,
+# and the output will be in the workdir/autodocs/output/ directory.
+build() {
+    # install dependencies
     apt-get -y update --fix-missing
     apt-get -y install lua5.1 liblua5.1-0-dev
     curl https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh -sL | bash -
     luarocks install ldoc
-}
 
-generate_docs() {
+    # generate docs
     rm -rf autodocs/output || true
     mkdir autodocs/output || true
     cd autodocs/output
-    ldoc -c ../config.ld ../../apisix/core/request.lua
-    ldoc -c ../config.ld ../../apisix/core/id.lua
+    path="../../apisix/core"
+    files=$(ls $path)
+    for filename in $files
+    do
+       ldoc -c ../config.ld $path/$filename

Review comment:
       fixed




-- 
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: notifications-unsubscribe@apisix.apache.org

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