-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
41 lines (33 loc) · 1023 Bytes
/
justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
alias run := serve
# List available recipes
default:
@just --list
# Setup dependencies
[group("development")]
setup:
bundle install
# Serve site locally
[group("development")]
serve:
bundle exec jekyll serve
# Build site
[group("maintenance")]
build:
bundle exec jekyll build
# Clean up generated site files
[group("maintenance")]
clean:
rm -rf _site
# Create new post
[group("content")]
@create-post TITLE:
touch "_posts/{{datetime('%Y-%m-%d')}}-{{kebabcase(lowercase(TITLE))}}.md"
echo "---" > "_posts/{{datetime('%Y-%m-%d')}}-{{kebabcase(lowercase(TITLE))}}.md"
echo "layout: page" >> "_posts/{{datetime('%Y-%m-%d')}}-{{kebabcase(lowercase(TITLE))}}.md"
echo "title: \"{{TITLE}}\"" >> "_posts/{{datetime('%Y-%m-%d')}}-{{kebabcase(lowercase(TITLE))}}.md"
echo "---" >> "_posts/{{datetime('%Y-%m-%d')}}-{{kebabcase(lowercase(TITLE))}}.md"
echo "" >> "_posts/{{datetime('%Y-%m-%d')}}-{{kebabcase(lowercase(TITLE))}}.md"
# Add new reading entry
[group("content")]
@add-book:
ruby bin/book.rb