www.byjp.me/Taskfile.yml
JP Hastings-Spital d9f8b33ee7 Add Gemini task
2024-04-29 17:41:56 +01:00

51 lines
1.5 KiB
YAML

# https://taskfile.dev
version: '3'
vars:
domain: https://www.byjp.me
puma_dev_tld: .test
env:
HUGO_INDIEKIT_URL: https://indiekit.byjp.me{{.DOMAIN_SUFFIX}}
HUGO_LAST_UPDATE_TIME:
sh: git log -1 --format=%cI
HUGO_LAST_UPDATE_HASH:
sh: git log -1 --format=%h
tasks:
check-links:
desc: Check URLs across my site for linkrot.
cmds:
- lychee --cache --require-https --config lychee.toml .
dev:
desc: Run a local server that auto-updates when files are edited. (Search won't work)
silent: true
vars:
port: 1313
cmds:
- |
[ -d "$HOME/.puma-dev/" ] && (echo {{ .port }} > $HOME/.puma-dev/www.byjp.me) || echo "Puma dev not installed, https://{{ .domain }}{{ .puma_dev_tld }} will not work"
- hugo server -p {{ .port }} --minify --printUnusedTemplates -D --baseURL "{{ .domain }}{{ .puma_dev_tld }}" --appendPort=false
build:
desc: Builds the production-ready site in ./public/
vars:
cache: /tmp/hugo/cache
cmds:
- hugo --cacheDir {{ .cache }} --gc --minify --baseURL "{{ .domain }}"
- pagefind
import:
desc: Pulls information from various other sites/silos into this repo. Expects `./tools/.env` to be populated.
dir: tools/
cmds:
- go run ./import/omnivore ../
- go run ./import/webmentionio
gemini:
desc: Builds the site & starts a gemini server (on the default port) for it.
deps: [ build ]
cmds:
- agate --content public --lang en-GB --hostname localhost --central-conf