#+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 * Thesarus #+begin_src emacs-lisp (use-package popup) (use-package synosaurus :after popup :config (setq synosaurus-backend 'synosaurus-backend-wordnet synosaurus-choose-method 'popup)) #+end_src * Grammarly #+begin_src emacs-lisp (use-package flycheck) (use-package flycheck-grammarly :after flycheck :config (setq flymake-grammarly-check-time 0.8) ) #+end_src * Language tool #+begin_src emacs-lisp (use-package languagetool :ensure t :commands (languagetool-check languagetool-clear-suggestions languagetool-correct-at-point languagetool-correct-buffer languagetool-set-language languagetool-server-mode languagetool-server-start languagetool-server-stop) :config ;; (setq languagetool-java-arguments '("jexec" "ltex" "java" "-Dfile.encoding=UTF-8") ;; languagetool-java-bin "doas" ;; languagetool-console-command "/root/ltex/languagetool-commandline.jar" ;; languagetool-console-arguments '("--languagemodel" "/var/ngrams/" "-l" "en-US") ;; languagetool-server-command "/root/ltex/languagetool-server.jar") (setq languagetool-java-arguments '("jexec" "ltex" "java" "-Dfile.encoding=UTF-8") languagetool-server-urls "http://languagetool.org") :init (defun languagetool-console-command-exists-p () t )) #+end_src #+RESULTS: : [nil 26245 23595 987957 nil elpaca-process-queues nil nil 111999 nil]