Files
docs/justfile
Michael Housh 2fa26ef552
All checks were successful
CI / release (push) Successful in 7m6s
feat: Removes unused about section.
2025-04-07 08:47:36 -04:00

38 lines
1.2 KiB
Makefile

articles := "./content/articles"
docker_image := "homelab/docs"
docker_tag := "latest"
shortdate := `date +%F`
[private]
default:
@just --list
# Run the development server.
[group('dev')]
run:
#!/usr/bin/env zsh
touch .build/browser-dev-sync
browser-sync start -p localhost:1414 --watch --files '.build/browser-dev-sync' &
watchexec -w Sources -e .swift -r 'swift run && touch .build/browser-dev-sync' &
watchexec -w content -e .md -r 'swift run && touch .build/browser-dev-sync' &
watchexec -w .build/browser-dev-sync --ignore-nothing -r 'npx -y pagefind --site deploy --serve'
# Create a new article with given name and tags.
new-article name *tags:
@echo "---" > {{articles}}/{{shortdate}}-{{name}}.md
@echo "date: {{shortdate}}" >> {{articles}}/{{shortdate}}-{{name}}.md
@echo "tags: `./scripts/join-tags.sh {{tags}}`" >> {{articles}}/{{shortdate}}-{{name}}.md
@echo "---" >> {{articles}}/{{shortdate}}-{{name}}.md
@echo {{articles}}/{{shortdate}}-{{name}}.md
alias n := new-article
latest-article:
@echo "$(find {{articles}} -maxdepth 1 -mindepth 1 -type f | sort -nr | head -1)"
alias l := latest-article
[group('dev')]
build:
@docker build --tag {{docker_image}}:{{docker_tag}} .