Commit 6abdc720032c

Vincent Demeester <vincent@sbr.pm>
2022-05-05 21:11:40
www: update some function and Makefile
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent a48063f
Changed files (4)
www/vincent.demeester.fr/lib/publish.el
@@ -134,5 +134,10 @@
          :recursive t)
         ("all" :components ("posts" "about" "index" "articles" "articles-assets" "css" "images" "assets" "legacy" "posts-rss"))))
 
+(defun publish ()
+  "Build vincent.demeester.fr website"
+  (delete-directory (expand-file-name "~/.org-timestamps") t)
+  (org-publish-all))
+
 (provide 'publish)
 ;;; publish.el ends here
www/vincent.demeester.fr/Makefile
@@ -48,11 +48,11 @@ all: build
 
 
 .PHONY: build
-build: publish.el publish-common.el build-articles
+build: lib/publish.el lib/publish-common.el build-articles
 	@echo "Publishing... with current Emacs configurations."
 	${EMACS} --debug-init --batch --directory $(DOTEMACS)/lisp/ --directory $(DOTEMACS)/lisp/vorg/ \
 		--load lib/publish-common.el --load lib/publish.el \
-		--funcall org-publish-all
+		--funcall publish
 
 .PHONY: build-articles
 build-articles: $(NOTES)
www/Makefile
@@ -1,3 +1,5 @@
+all: build
+
 build:
 	make -C vincent.demeester.fr build
 
Makefile
@@ -87,6 +87,10 @@ clean-www:
 	-rm -rvf *.elc
 	-rm -rv ~/.org-timestamps/*
 
+.PHONY: www
+www:
+	(cd www; make)
+
 # Documentation build and publishing
 .PHONY: update-docs
 update-docs: