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:
|
run:
|
||||||
@swift run watch content Sources deploy
|
@swift run watch content Sources deploy
|
||||||
|
|
||||||
new-article name:
|
# Create a new article with given name and tags.
|
||||||
@touch {{articles}}/{{shortdate}}-{{name}}.md
|
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
|
@echo {{articles}}/{{shortdate}}-{{name}}.md
|
||||||
|
|
||||||
alias n := new-article
|
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')]
|
[group('dev')]
|
||||||
build:
|
build:
|
||||||
@docker build --tag {{docker_image}}:{{docker_tag}} .
|
@docker build --tag {{docker_image}}:{{docker_tag}} .
|
||||||
|
|||||||
3
scripts/join-tags.sh
Executable file
3
scripts/join-tags.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/zsh
|
||||||
|
|
||||||
|
echo ${(j., .)@}
|
||||||
Reference in New Issue
Block a user