From 9f9bc3d143274b3f526ff93da7f5f737b0914194 Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Mon, 28 Jan 2019 01:04:29 +0300 Subject: [PATCH] Serve web interface and documentation from clever directory --- book.json | 2 +- builder/assets/monkey | 2 +- builder/image-build.sh | 10 ---------- builder/image-ros.sh | 5 +++++ clever/www/docs | 1 + {builder/assets => clever/www}/index.html | 4 +--- 6 files changed, 9 insertions(+), 15 deletions(-) create mode 120000 clever/www/docs rename {builder/assets => clever/www}/index.html (56%) diff --git a/book.json b/book.json index ea6999d0..ba357259 100644 --- a/book.json +++ b/book.json @@ -17,7 +17,7 @@ "id": 49359238 }, "bulk-redirect": { - "basepath": "/", + "basepath": "", "redirectsFile": "redirects.json" } } diff --git a/builder/assets/monkey b/builder/assets/monkey index 4a481242..81e5c916 100644 --- a/builder/assets/monkey +++ b/builder/assets/monkey @@ -20,7 +20,7 @@ # Example: # DocumentRoot /home/krypton/htdocs - DocumentRoot /usr/share/monkey-static + DocumentRoot /home/pi/catkin_ws/src/clever/clever/www # Redirect: # --------- diff --git a/builder/image-build.sh b/builder/image-build.sh index cc3edf65..97eb6b45 100755 --- a/builder/image-build.sh +++ b/builder/image-build.sh @@ -82,16 +82,6 @@ ${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} exec ${SCRIPTS_DIR}'/image-init.sh' # Monkey ${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/monkey' '/root/' -${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/index.html' '/usr/share/monkey-static/' - -# Gitbook -apt-get install -y curl gnupg -curl -sL https://deb.nodesource.com/setup_11.x | bash - -apt-get install -y nodejs -npm install gitbook-cli -g -gitbook build ${REPO_DIR}'/docs' -${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${REPO_DIR}'/docs/_book/' '/usr/share/monkey-static/docs/' - # Butterfly ${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/butterfly.service' '/lib/systemd/system/' diff --git a/builder/image-ros.sh b/builder/image-ros.sh index df736110..2bbdd2aa 100755 --- a/builder/image-ros.sh +++ b/builder/image-ros.sh @@ -148,6 +148,11 @@ echo_stamp "Installing CLEVER" \ && echo_stamp "All CLEVER was installed!" "SUCCESS" \ || (echo_stamp "CLEVER installation was failed!" "ERROR"; exit 1) +echo_stamp "Build CLEVER documentation" +cd /home/pi/catkin_ws/src/clever +npm install gitbook-cli -g +gitbook build + echo_stamp "Installing additional ROS packages" apt-get install -y --no-install-recommends \ ros-kinetic-dynamic-reconfigure \ diff --git a/clever/www/docs b/clever/www/docs new file mode 120000 index 00000000..d7fb46af --- /dev/null +++ b/clever/www/docs @@ -0,0 +1 @@ +../../_book/ \ No newline at end of file diff --git a/builder/assets/index.html b/clever/www/index.html similarity index 56% rename from builder/assets/index.html rename to clever/www/index.html index 422d1fbf..a9c35c1d 100644 --- a/builder/assets/index.html +++ b/clever/www/index.html @@ -1,11 +1,9 @@

CLEVER Drone Kit Tools