You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.4 KiB

  1. #!/bin/bash
  2. # Init hugo config file
  3. python init_hugo_toml.py
  4. if ! [ -e "/themes/lotusdocs" ]; then
  5. if ! [ -e "/themes" ]; then
  6. mkdir themes
  7. fi
  8. git clone https://github.com/colinwilson/lotusdocs themes/lotusdocs
  9. fi
  10. #################################################################################
  11. # For later, when books will be configurabled without themes content copy #
  12. #################################################################################
  13. # Start Hugo server in the background. This will import/update Lotusdocs module.
  14. # The import of the module is important to get the themes files, because some of
  15. # the sub-directories must be adapted to the future doc structure.
  16. # hugo server > init_hugo.log 2>&1 &
  17. # # Wait for the end of the initialization process and stop hugo
  18. # while true; do
  19. # if grep -q "Web Server is available" init_hugo.log; then
  20. # # Initialization done
  21. # echo "Initialization complete. Web Server is available."
  22. # # Get the PID of the Hugo process and store it in a file for later use
  23. # pgrep -f "hugo server" | kill
  24. # # You can stop the loop if you don't need to monitor the log anymore
  25. # break
  26. # fi
  27. # sleep 1
  28. # done
  29. # # We don't need init_hugo.log anymore
  30. # rm init_hugo.log
  31. # Generate Hugo Lotusdoc website structure and config
  32. python generate_lotusdocs.py