feat: Updates to justfile to generate new articles and find the latest article.
All checks were successful
CI / release (push) Successful in 7m11s
All checks were successful
CI / release (push) Successful in 7m11s
This commit is contained in:
13
justfile
13
justfile
@@ -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}} .
|
||||
|
||||
Reference in New Issue
Block a user