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

View File

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