Browse Source

cleanup makefile

pull/1/head
Brett Langdon 12 years ago
parent
commit
b31296c658
1 changed files with 10 additions and 7 deletions
  1. +10
    -7
      Makefile

+ 10
- 7
Makefile View File

@ -1,24 +1,27 @@
WINTERSMITH = ./node_modules/.bin/wintersmith
ARTICLE_DIR = ./contents/is/writing/about
build:
./node_modules/.bin/wintersmith build
@$(WINTERSMITH) build
clean:
@ rm -rf build
@rm -rf build
preview:
./node_modules/.bin/wintersmith preview
@$(WINTERSMITH) preview
add_article:
@echo "Enter Article Title: "
@read title;\
dir=`echo $$title | sed "s/ /-/g"`;\
mkdir -p contents/is/writing/about/$$dir;\
cat base.md | sed "s/{title}/$$title/g" | sed s/{date}/`date "+%Y-%m-%d"`/g> contents/is/writing/about/$$dir/index.md;\
emacs contents/is/writing/about/$$dir/index.md
mkdir -p $(ARTICLE_DIR)/$$dir;\
cat base.md | sed "s/{title}/$$title/g" | sed s/{date}/`date "+%Y-%m-%d"`/g> $(ARTICLE_DIR)/$$dir/index.md;\
emacs $(ARTICLE_DIR)/$$dir/index.md
remove_article:
@echo "Enter Article Title: "
@read title;\
dir=`echo $$title | sed "s/ /-/g"`;\
rm -rf contents/is/writing/about/$$dir
rm -rf $(ARTICLE_DIR)/$$dir
.PHONY: build clean preview add_article remove_article

Loading…
Cancel
Save