Various scripts for optimizing work with Hugo Static Site Generator.
Creates a directory of optimized images and thumbnail files for use in Hugo Easy Gallery.
- Creates a new gallery drectory. (Will not overwrite existing directories.)
- Creates reasonably sized gallery images (default: 1200px wide)
- Creates matching thumbnail images (defaut: 300px wide)
- Sets read permissions on all gallery images.
- Attempts to wipe clean OSX quarantine bits.
- Adds an index.html file to the new gallery directory to block index viewing.
- Calls the Hugo 'new' command to create a <YOUR_NEW_GALLERY>.md file.
- Install ImageMagick: https://www.imagemagick.org/script/download.php
- Install gallerymaker.sh, and make it executable.
- Set default values in gallerymaker.sh.
- HUGO_ROOT="/path/to/your/hugo/installation/"
- GALLERY_ROOT="/static/img/gallery" # The directory in which all your galleries are stored.
- GALLERY_SECTION="gallery" # The Hugo Section used to display galleries.
- IMAGE_WIDTH=1200
- THUMB_WIDTH=300
- Create a directory of images for use in your new gallery.
- In the terminal, cd into this directory.
- Run gallerymaker.sh, such as:
$ gallerymaker.sh [-g my-new-gallery] [-t -thumb] # If in your path
$ ./gallerymaker.sh [-g my-new-gallery] [-t -thumb] # If in the current directory
$ ~/bin/gallerymaker.sh [-g my-new-gallery] [-t -thumb] # If in bin