summaryrefslogtreecommitdiff
path: root/README.md
blob: 60c54b3fc8db2994a1cf56a5b023eec956329d82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# 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](https://github.com/haturatu/webpsh)

## Configuration

Before using the script, update the following variables:
```bash
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:
```bash
./lumebuild.sh
```
Set up as a cron job to run automatically:
```bash
crontab -e
```
Add a line like this to run the script at your preferred interval:
```bash
*/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:
```bash
chmod +x lumebuild.sh
```