From: Christian Shtarkov Date: Sun, 20 Oct 2024 23:59:04 +0000 (+0100) Subject: Add command for local testing X-Git-Url: https://shtarkov.net/gitweb/?a=commitdiff_plain;h=daec61e72440f84d4c53eb6cfac98719b44bf186;p=shtarkov.net.git Add command for local testing --- 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")