Skip to content

Commit

Permalink
Makefile: open created post file
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagokokada committed Aug 21, 2024
1 parent 61925df commit 0032f6a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .scripts/gen-post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ while [ "$i" -ne 100 ]; do
fi

file="$DATE/$n-$SLUG.md"
echo "Creating file: $file"
echo "# ${TITLE}" > "$file"
echo "$file"
exit 0
done

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ TITLE = $(error TITLE is not defined)
SLUG = $(shell ./blog -slugify "$(TITLE)")
.PHONY: post
post: blog day
DATE=$(DATE) SLUG=$(SLUG) ./.scripts/gen-post.sh
$(EDITOR) $(shell DATE=$(DATE) SLUG=$(SLUG) ./.scripts/gen-post.sh)

FILE = $(error FILE is not defined)
.PHONY: draft
Expand Down

0 comments on commit 0032f6a

Please sign in to comment.