fakestache-ssg

[ARCHIVED] A static site generator in Bash 4.
Log | Files | Refs | Submodules | README

clean-content-folder (366B)


      1 #!/bin/bash
      2 
      3 # Then remove those in the content folder
      4 clean_content_folder () {
      5     echo "- Clean the content/ folder from all the HTML files"
      6 
      7     find "$CONTENT_PATH/" -name \*.html -type f -delete
      8 
      9     # After that remove empty directories
     10     echo "- Clean the content/ folder from all the empty directories"
     11 
     12     find "$CONTENT_PATH/" -type d -empty -delete
     13 }