feat: Updates to justfile to generate new articles and find the latest article.
All checks were successful
CI / release (push) Successful in 7m11s

This commit is contained in:
2025-04-03 15:22:37 -04:00
parent ceaa7edac4
commit b44e1b45b0
2 changed files with 14 additions and 2 deletions

View File

@@ -12,12 +12,21 @@ default:
run:
@swift run watch content Sources deploy
new-article name:
@touch {{articles}}/{{shortdate}}-{{name}}.md
# 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}} .