-
-
Save Stebalien/3eaee8ee0534ab961b2a1cb615511151 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env -S emacs --script | |
;; Sandbox | |
(setq | |
user-emacs-directory (concat (file-name-directory load-file-name) ".emacs/") | |
package-user-dir (concat user-emacs-directory "elpa/") | |
use-package-always-ensure t | |
inhibit-message t) ; if there are errors, remove this. | |
; debug-on-error t) ; if there are errors, add this. | |
;; require package | |
(require 'package) | |
;; enable melpa | |
(add-to-list | |
'package-archives | |
'("melpa" . "https://melpa.org/packages/") | |
t) | |
;; Initialize use-package | |
(package-initialize) | |
(unless (require 'use-package nil 'noerror) | |
(package-refresh-contents) | |
(package-install 'use-package)) | |
;; Install required packages. | |
(use-package ox-hugo) | |
;; process input | |
(with-temp-buffer | |
(progn | |
(condition-case nil | |
(let (line) | |
(while (setq line (read-from-minibuffer "")) | |
(insert line) | |
(insert "\n"))) | |
(error nil)) | |
(princ (org-export-as 'hugo)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment