update with upload script and gitignores to follow

This commit is contained in:
Daniel Alejandro Gallegos 2024-04-16 22:06:17 -04:00
parent f0b645cb67
commit 0ab9af0748
Signed by: taco
SSH key fingerprint: SHA256:YgoAbZ3x1d1kTGKEmT8elbjEvK/mn0hc4ATFgWhykR0
9 changed files with 47 additions and 6 deletions

19
.gitignore vendored Normal file
View file

@ -0,0 +1,19 @@
# sourced from:
# https://raw.githubusercontent.com/github/gitignore/main/community/golang/hugo.gitignore
# generated files by hugo
/public/
/resources/_gen/
/assets/jsconfig.json
hugo_stats.json
# executable may be added to repository
hugo.exe
hugo.darwin
hugo.linux
# temporary lock file while building
/.hugo_build.lock
# don't commit secrets
upload.conf

@ -1 +1 @@
Subproject commit c222bcb317c9f78ca1086743b4133ae18f2209c0
Subproject commit 2d966c6c9ca485810c503aec6aedde2ee00dba72

@ -1 +1 @@
Subproject commit 2aa14a29394d0b503efd884b3ee265e39e8ae2f2
Subproject commit 3289515b956c3c55cb584c982959be8ea79c7ebd

@ -1 +1 @@
Subproject commit dc31f35ee9bb909eed3167dcb8ea55614a46dbb1
Subproject commit 3a6c1922e429f4f0e4f9ed6a0fd6a48f7385a20b

@ -1 +1 @@
Subproject commit 472b00acdd7219e1d70c3081e520986c404ea115
Subproject commit 30a1fe9906d7a1bd90b685938a0071d0f79be119

@ -1 +1 @@
Subproject commit 5102859558284c918f28b57b9023892158fd0efd
Subproject commit 4f05a6c11c77fd239393452405def74fb93da6c1

@ -1 +1 @@
Subproject commit e1f7b5e8bde44591801e94be6682767004fa74da
Subproject commit 4b1fcad4abe0f55fc134192b290dcd6b069ea6b3

3
upload.conf.example Normal file
View file

@ -0,0 +1,3 @@
SITE_DIR=_site
NEOCITIES_API_KEY=xxxapikeyxxx

19
upload.sh Executable file
View file

@ -0,0 +1,19 @@
#!/usr/bin/env bash
# build a hugo site and upload it to neocities
# usage: ./upload.sh mestizo.monster
# inspired by: https://gitlab.com/unixispower/after-the-beep/-/blob/main/_utils/upload
# load config file
CONFIG_FILE="$1/upload.conf"
. "$CONFIG_FILE"
# export variable from config file
export NEOCITIES_API_KEY
# build site
hugo -s "$1"
# push index last to ensure resources are available
neocities push -e index.html "$1/$SITE_DIR"
neocities upload "$1/$SITE_DIR/index.html"