Reorganize directory structure
This commit is contained in:
parent
a2e8bda421
commit
8d3fde7d3e
11 changed files with 16 additions and 16 deletions
30
Makefile
30
Makefile
|
@ -1,32 +1,32 @@
|
|||
ODIR=output
|
||||
PAGES_SRC := $(wildcard pages/*)
|
||||
PAGES_DST := $(patsubst pages/%,$(ODIR)/%/index.html,$(PAGES_SRC))
|
||||
PAGES_SRC := $(wildcard content/pages/*)
|
||||
PAGES_DST := $(patsubst content/pages/%,$(ODIR)/%/index.html,$(PAGES_SRC))
|
||||
|
||||
PROJECTS_SRC := $(wildcard projects/*)
|
||||
PROJECTS_DST := $(patsubst projects/%,$(ODIR)/projects/%/index.html,$(PROJECTS_SRC))
|
||||
PROJECTS_SRC := $(wildcard content/projects/*)
|
||||
PROJECTS_DST := $(patsubst content/projects/%,$(ODIR)/projects/%/index.html,$(PROJECTS_SRC))
|
||||
|
||||
POSTS_SRC := $(wildcard posts/*)
|
||||
POSTS_DST := $(patsubst posts/%,$(ODIR)/posts/%/index.html,$(POSTS_SRC))
|
||||
POSTS_SRC := $(wildcard content/posts/*)
|
||||
POSTS_DST := $(patsubst content/posts/%,$(ODIR)/posts/%/index.html,$(POSTS_SRC))
|
||||
|
||||
all: $(PAGES_DST) $(PROJECTS_DST) $(POSTS_DST) $(ODIR)/style.css $(ODIR)/index.html $(ODIR)/posts/index.html
|
||||
|
||||
$(ODIR)/%/index.html: pages/%/note.md
|
||||
$(ODIR)/%/index.html: content/pages/%/note.md
|
||||
mkdir -p "$(dir $@)"
|
||||
cat "$<" | ./mdpage.sh --notitle > "$@"
|
||||
cat "$<" | ./bin/mdpage.sh --notitle > "$@"
|
||||
|
||||
$(ODIR)/projects/%/index.html: projects/%/note.md
|
||||
$(ODIR)/projects/%/index.html: content/projects/%/note.md
|
||||
mkdir -p "$(dir $@)"
|
||||
cat "$<" | ./mdpage.sh > "$@"
|
||||
cat "$<" | ./bin/mdpage.sh > "$@"
|
||||
|
||||
$(ODIR)/posts/%/index.html: posts/%/note.md
|
||||
$(ODIR)/posts/%/index.html: content/posts/%/note.md
|
||||
mkdir -p "$(dir $@)"
|
||||
cat "$<" | ./mdpage.sh > "$@"
|
||||
cat "$<" | ./bin/mdpage.sh > "$@"
|
||||
|
||||
$(ODIR)/posts/index.html: $(POSTS_SRC)
|
||||
./toc.sh posts "/posts" | awk -f markdown.awk | ./page.sh Posts > "$@"
|
||||
./bin/toc.sh content/posts "/posts" | awk -f ./bin/markdown.awk | ./bin/page.sh Posts > "$@"
|
||||
|
||||
$(ODIR)/index.html: index.md
|
||||
cat index.md | ./mdpage.sh --notitle > "$@"
|
||||
$(ODIR)/index.html: content/index.md
|
||||
cat content/index.md | ./bin/mdpage.sh --notitle > "$@"
|
||||
|
||||
$(ODIR)/style.css: style.css
|
||||
cp style.css $(ODIR)/style.css
|
||||
|
|
|
@ -21,7 +21,7 @@ render() {
|
|||
[ "$NOTITLE" == "0" ] && echo "# $TITLE";
|
||||
echo "$LASTLINE";
|
||||
cat
|
||||
} | awk -f markdown.awk | ./page.sh "$TITLE"
|
||||
} | awk -f ./bin/markdown.awk | ./bin/page.sh "$TITLE"
|
||||
|
||||
}
|
||||
|
Loading…
Reference in a new issue