diff --git a/Makefile b/Makefile index d9d288e..1593e3d 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ PARSEFUNC=md4tj-parse -CC=emacs --no-site-file --batch -l ./md4tj/md4tj.el --eval +CC=emacs --no-site-file --batch -l ./md4tj/md4tj-util.el -l ./md4tj/md4tj.el -l ./md4tj/md4tj-blog.el --eval .PHONY: css #.PHONY: vids @@ -8,7 +8,12 @@ SITE_ROOT=./site_root # Makes sure the necessary destination directories get made SITE_ROOT_RESULT=$(shell sh make_site_root.sh) -all: $(SITE_ROOT_RESULT) index about links archives takes restaurants css +BLOGS=$(wildcard ./blog/*.md4tj) +BLOGSHTMLTMP=$(addprefix $(SITE_ROOT)/,$(BLOGS)) +BLOGSHTML=$(subst .md4tj,.html,$(BLOGSHTMLTMP)) +#$(error $(BLOGSHTML)) + +all: $(SITE_ROOT_RESULT) index about links archives takes restaurants css blog index: $(SITE_ROOT)/index.html @@ -22,9 +27,14 @@ archives: $(SITE_ROOT)/archives.html restaurants: $(SITE_ROOT)/restaurants.html +blog: $(SITE_ROOT)/blog.html $(BLOGSHTML) + $(SITE_ROOT)/%.html: %.md4tj $(CC) "($(PARSEFUNC) \"$^\" \"$@\")" +$(SITE_ROOT)/blog/%.html: %.md4tj + $(CC) "($(PARSEFUNC) \"$^\" \"$@\")" + css: cp css/main.css site_root/css diff --git a/blog.md4tj b/blog.md4tj new file mode 100644 index 0000000..bb7d9f0 --- /dev/null +++ b/blog.md4tj @@ -0,0 +1,14 @@ +@@META charset UTF-8 +@@META name viewport content width=device-width,initial-scale=1.0 +@@TITLE The Jerks - Blog +@@CSS css/main.css +# The Jerks +## Blog + +My mindless ramblings. + +@@INCLUDE nav.md4tj + +@@BLOGBASEDIR ./blog/ +@@BLOGBASEURL https://www.thejerks.club/blog/ +@@BLOGINSERT \ No newline at end of file diff --git a/blog/helloworld.md4tj b/blog/helloworld.md4tj new file mode 100644 index 0000000..4ea122e --- /dev/null +++ b/blog/helloworld.md4tj @@ -0,0 +1,14 @@ +@@META charset UTF-8 +@@META name viewport content width=device-width,initial-scale=1.0 +@@TITLE Hello world! +@@CSS ../css/main.css +# The Jerks +## Blog +### Hello world! + +@@INCLUDE nav.md4tj + +@@BLOGPOSTTITLE Hello world! +@@BLOGPOSTDATE 1679880579 + +Hello world! This is my first blog post. Not much to see here, this is mainly a test to make sure my blog generates properly. More blog posts forthcoming. \ No newline at end of file diff --git a/make_site_root.sh b/make_site_root.sh index f825a99..2b50d75 100755 --- a/make_site_root.sh +++ b/make_site_root.sh @@ -2,3 +2,4 @@ mkdir -p ./site_root mkdir -p ./site_root/css mkdir -p ./site_root/vids +mkdir -p ./site_root/blog