Skip to content

run with cron, manage changes with git, and build

Notifications You must be signed in to change notification settings

haturatu/lumebuild

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 

Repository files navigation

lumebuild

A simple bash script to automate the build process for Lume static site generator.

Overview

This script automates the following tasks:

  1. Commits changes in the source directory
  2. Converts images to WebP format (if configured)
  3. Builds the site using Lume

Prerequisites

  • Deno installed
  • Lume static site generator
  • Git
  • WebP conversion tool (optional)
  • Mastodon Post (optional)

WebP convert scripts are in this repository of mine

Configuration

Before using the script, update the following variables:

LUME_DIR="/your/lume/dir"        # Path to your Lume project directory
SRC_DIR="$LUME_DIR/src"          # Path to your Lume source directory
BUILD_DIR="site"                 # Path to your Lume output directory
WEBPSH="/your/webp/convert/path" # Path to WebP conversion script optional
COMMIT_COMMENT="`date`"          # Your fav commit comment
FEDI_CMT="y"                     # Fediverse Post(use toot)

Usage

Simply run the script:

./lumebuild.sh

Set up as a cron job to run automatically:

crontab -e

Add a line like this to run the script at your preferred interval:

*/5 * * * * /path/to/lumebuild.sh

What it does

  1. Sets up Deno environment variables
  2. Changes to the source directory
  3. Commits any changes using Git
  4. Runs WebP conversion if configured
  5. Builds the site using Lume, outputting to the 'site' directory

Note

Make sure the script has executable permissions:

chmod +x lumebuild.sh

About

run with cron, manage changes with git, and build

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages