From daec61e72440f84d4c53eb6cfac98719b44bf186 Mon Sep 17 00:00:00 2001 From: Christian Shtarkov Date: Mon, 21 Oct 2024 00:59:04 +0100 Subject: [PATCH] Add command for local testing --- onerc.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/onerc.el b/onerc.el index 5c054ad..ff752e3 100644 --- a/onerc.el +++ b/onerc.el @@ -151,6 +151,14 @@ INFO is a plist holding contextual information." (format "%s" href (or (org-string-nw-p desc) href))))) +(defun shtarkov.net-local () + (interactive) + (unless (string-equal (buffer-name) "shtarkov.net.org") + (user-error "Must be visiting the proper file.")) + (let ((default-directory (concat default-directory "public/"))) + (async-shell-command "python3 -m http.server" "*local shtarkov.net*")) + (browse-url "http://localhost:8000/")) + (defun shtarkov.net-build-and-deploy () (interactive) (unless (string-equal (buffer-name) "shtarkov.net.org") -- 2.43.5