aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 11 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 8f81f2b..194fc8e 100644
--- a/Makefile
+++ b/Makefile
@@ -2,8 +2,8 @@
DOMAIN = www.sacredheartsc.com
URL = https://$(DOMAIN)
RSYNC_TARGET = $(DOMAIN):/var/www/$(DOMAIN)
-FEED_TITLE = sacredheartsc blog
-FEED_DESCRIPTION = Carolina-grown articles about self-hosting, privacy, unix, and more.
+FEED_TITLE = Cullum Smith's Blog
+FEED_DESCRIPTION = Dad, southerner, unix wrangler, banjo enjoyer
STATIC_REGEX = .*\.(html|css|jpg|jpeg|png|ico|xml|txt|asc)
BLOG_LIST_LIMIT = 5
@@ -96,6 +96,15 @@ $(OUTPUT_DIR)/%: $(SOURCE_DIR)/%
install:
pip install -r requirements.txt
+.PHONY: post
+post:
+ @test $${NAME?Post URL component must be set in variable NAME.}
+ifeq (,$(wildcard $(SOURCE_DIR)/$(BLOG_DIR)/$(NAME)/index.md))
+ mkdir -p "$(SOURCE_DIR)/$(BLOG_DIR)/$(NAME)"
+ printf -- '---\ntitle: %s\ndate: %s\nsubtitle:\ndescription: \n---\n\n\n' "$(NAME)" "$$(date '+%B %d, %Y')" > $(SOURCE_DIR)/$(BLOG_DIR)/$(NAME)/index.md
+endif
+ $(EDITOR) $(SOURCE_DIR)/$(BLOG_DIR)/$(NAME)/index.md
+
serve: public
cd $(OUTPUT_DIR) && python3 -m http.server