mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-12 16:47:24 +01:00
Improve taskfile
This commit is contained in:
parent
7b47ac5d61
commit
d0194823a0
1 changed files with 16 additions and 7 deletions
23
Taskfile.yml
23
Taskfile.yml
|
@ -2,11 +2,11 @@
|
||||||
|
|
||||||
version: '3'
|
version: '3'
|
||||||
|
|
||||||
# TODO: Handle commands in dotenv
|
vars:
|
||||||
# dotenv: ['.env']
|
domain: https://www.byjp.me
|
||||||
|
puma_dev_tld: .test
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOMAIN: https://www.byjp.me
|
|
||||||
HUGO_INDIEKIT_URL: https://indiekit.byjp.me{{.DOMAIN_SUFFIX}}
|
HUGO_INDIEKIT_URL: https://indiekit.byjp.me{{.DOMAIN_SUFFIX}}
|
||||||
HUGO_LAST_UPDATE_TIME:
|
HUGO_LAST_UPDATE_TIME:
|
||||||
sh: git log -1 --format=%cI
|
sh: git log -1 --format=%cI
|
||||||
|
@ -15,21 +15,30 @@ env:
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
check-links:
|
check-links:
|
||||||
|
desc: Check URLs across my site for linkrot.
|
||||||
cmds:
|
cmds:
|
||||||
- lychee --cache --require-https --config lychee.toml .
|
- lychee --cache --require-https --config lychee.toml .
|
||||||
|
|
||||||
dev:
|
dev:
|
||||||
env:
|
desc: Run a local server that auto-updates when files are edited. (Search won't work)
|
||||||
DOMAIN_SUFFIX: .test
|
silent: true
|
||||||
|
vars:
|
||||||
|
port: 1313
|
||||||
cmds:
|
cmds:
|
||||||
- hugo server --minify --printUnusedTemplates -D --baseURL "${DOMAIN}${DOMAIN_SUFFIX}" --appendPort=false
|
- |
|
||||||
|
[ -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:
|
build:
|
||||||
|
desc: Builds the production-ready site in ./public/
|
||||||
|
vars:
|
||||||
|
cache: /tmp/hugo/cache
|
||||||
cmds:
|
cmds:
|
||||||
- hugo --cacheDir /tmp/hugo/cache --gc --minify --baseURL "${DOMAIN}"
|
- hugo --cacheDir {{ .cache }} --gc --minify --baseURL "{{ .domain }}"
|
||||||
- pagefind
|
- pagefind
|
||||||
|
|
||||||
import:
|
import:
|
||||||
|
desc: Pulls information from various other sites/silos into this repo. Expects `./tools/.env` to be populated.
|
||||||
dir: tools/
|
dir: tools/
|
||||||
cmds:
|
cmds:
|
||||||
- go run ./import/omnivore ../
|
- go run ./import/omnivore ../
|
||||||
|
|
Loading…
Reference in a new issue