Compare commits

...

2 Commits

Author SHA1 Message Date
Andrew Stryker fcd670d638 Merge branch 'main' of ssh://git.sdf.org/axs/website 2024-01-09 17:04:41 -08:00
Andrew Stryker 8a692c80bd Tidy and organize Makefile
No features added.
2024-01-09 17:00:48 -08:00
1 changed files with 30 additions and 2 deletions

View File

@ -1,7 +1,26 @@
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-#
#
# Manage website building
#
# Andrew Stryker <axs@sdf.org>
#
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-#
#-----------------------------------------------------------------------------#
#
# Configuration
#
#-----------------------------------------------------------------------------#
DEST ?= axs@sdf.org:html
SITE_URL ?= https://axs.sdf.org
#-----------------------------------------------------------------------------#
#
# Define user interface
#
#-----------------------------------------------------------------------------#
.PHONY: default help publish build
default: build
@ -9,7 +28,7 @@ default: build
build: .build_sentinel #>
publish: build #> Publish site
@echo "Publishing..."
@echo "📰Publishing..."
@# rsync options:
@# verbose: show each operation
@# links: preserve symlinks
@ -17,7 +36,7 @@ publish: build #> Publish site
@# times: preserve modification times
@# delete: delete extraneous files, i.e., files on destination
@# chmod: set permsions
@echo "\t Copying from public to ${DEST}"
@echo "\t 📡 Copying from public to ${DEST}"
@rsync \
--verbose \
--recursive \
@ -34,6 +53,12 @@ publish: build #> Publish site
@echo "✓ Publising complete"
@echo "\nThe site should be available on ${SITE_URL}"
#-----------------------------------------------------------------------------#
#
# Define file interface
#
#-----------------------------------------------------------------------------#
.build_sentinel: $(wildcard content/*/*)
@echo "\t 🏗️ Building site"
@# We call hugo with two options:
@ -41,3 +66,6 @@ publish: build #> Publish site
@# --minify, to compress files my removing extra whitespace
hugo --cleanDestinationDir --minify
@touch $@
@echo "✓ Building complete"
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-#