summaryrefslogtreecommitdiff
path: root/mms-ox-publish.org
diff options
context:
space:
mode:
authormms <michal@sapka.me>2024-01-19 15:22:13 +0100
committermms <michal@sapka.me>2024-01-19 15:22:13 +0100
commit9ab57ee255a03b86ed7303aa94959e3b104e1719 (patch)
tree926293dc6d9460f1eab12231573b71abc8d5ac4e /mms-ox-publish.org
feat: extract into dedicated repo
Diffstat (limited to 'mms-ox-publish.org')
-rw-r--r--mms-ox-publish.org71
1 files changed, 71 insertions, 0 deletions
diff --git a/mms-ox-publish.org b/mms-ox-publish.org
new file mode 100644
index 0000000..3c30268
--- /dev/null
+++ b/mms-ox-publish.org
@@ -0,0 +1,71 @@
+#+TITLE: mms Emacs Config - Publishing
+#+AUTHOR: MichaƂ Sapka (https://michal.sapka.me)
+#+STARTUP: showall indent logdone
+
+#+HUGO_BASE_DIR: ~/ghq/vcs.sapka.me/michal-sapka-me/
+#+HUGO_WEIGHT: 400
+#+HUGO_SECTION: emacs/config
+#+HUGO_CATEGORIES: emacs emacs-config
+#+HUGO_MENU :menu "emacs-config" :name "Publishing"
+#+HUGO_CUSTOM_FRONT_MATTER: :abstract "My emacs config - publishing to Hugo"
+#+HUGO_CUSTOM_FRONT_MATTER: :menu-abstract "how the sausage... this site is made"
+#+EXPORT_FILE_NAME: publishing
+* Introduction
+
+I have a website under https://michal.sapka.me.
+It based on Hugo, but I want to /write/ in Org mode - and not in Markdown.
+
+* OX-Hugo
+
+Luckily, there is ready package called [[https://ox-hugo.scripter.co/][ox-hugo]].
+
+#+begin_src emacs-lisp
+ (use-package ox-hugo
+ :ensure t
+ :after ox)
+#+end_src
+
+* Local and remote writing
+
+I write in subpage-per-file, so I have a dedicated =blog.org=, =bsd.org=, =star-trek.org=, or =emacs.org=.
+All those files are stored in a single location on my computer.
+
+#+begin_src emacs-lisp
+ (setq mms-homepage-local-dir "/home/mms/ghq/vcs.sapka.me/michal-sapka-me/content-org/")
+#+end_src
+
+Sometimes however I want to edit them on a remote machine via =Tramp=.
+
+#+begin_src emacs-lisp
+ (setq mms-homepage-remote-dir (concat "/sshx:voy:" mms-homepage-local-dir))
+#+end_src
+
+
+I have a ready =ssh_config= for the =voy= (short for =voyager=) connection:
+
+#+begin_src conf :tangle yes
+Host voy
+ HostName 10.0.135
+ User mms
+#+end_src
+
+(don't worry, the device is not available outside my local network).
+
+I open the folder via:
+
+#+begin_src emacs-lisp
+ (defun mms-open-homepage-org-files ()
+ (interactive)
+ (dired (if mms-is-voyager
+ mms-homepage-local-dir
+ mms-homepage-remote-dir)))
+
+#+end_src
+
+Finally, I want to have quick access
+
+#+begin_src emacs-lisp
+ (mms-leader-keys
+ "o h" (lambda () (interactive) (mms-open-homepage-org-files)) :wk "open homepage")
+#+end_src
+