diff --git a/init.example.el b/init.example.el index c854a7f4e..aadb388dd 100644 --- a/init.example.el +++ b/init.example.el @@ -127,6 +127,7 @@ ;;ocaml ; an objective camel (org ; organize your plain life in plain text +dragndrop ; drag & drop files/images into org buffers + ;+hugo ; use Emacs for hugo blogging +ipython ; ipython/jupyter support for babel +pandoc ; export-with-pandoc support +present) ; using org-mode for presentations diff --git a/modules/lang/org/README.org b/modules/lang/org/README.org index b1c059e63..cf5462afd 100644 --- a/modules/lang/org/README.org +++ b/modules/lang/org/README.org @@ -61,6 +61,8 @@ https://www.mfoot.com/blog/2015/11/22/literate-emacs-configuration-with-org-mode + =+pandoc= Enables pandoc integration into the Org exporter. + =+present= Enables integration with reveal.js, beamer and org-tree-slide, so Emacs can be used for presentations. ++ =+hugo= Enables integration with [[https://gohugo.io][hugo]] to export from + Emacs well-formed ([[https://github.com/russross/blackfriday][blackfriday]]) markdown. ** Plugins + [[https://orgmode.org/][org-plus-contrib]] @@ -99,6 +101,8 @@ https://www.mfoot.com/blog/2015/11/22/literate-emacs-configuration-with-org-mode + [[https://github.com/anler/centered-window-mode][centered-window]] + [[https://github.com/takaxp/org-tree-slide][org-tree-slide]] + [[https://github.com/yjwen/org-reveal][ox-reveal]] ++ =+hugo= + + [[https://github.com/kaushalmodi/ox-hugo][ox-hugo]] ** Hacks + The window is recentered when following links. diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 07fdfe08e..bb7856ef1 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -868,6 +868,7 @@ compelling reason, so..." ;;; Custom org modules (if (featurep! +dragndrop) (load! "contrib/dragndrop")) + (if (featurep! +hugo) (load! "contrib/+hugo")) (if (featurep! +ipython) (load! "contrib/ipython")) (if (featurep! +present) (load! "contrib/present")) diff --git a/modules/lang/org/contrib/+hugo.el b/modules/lang/org/contrib/+hugo.el new file mode 100644 index 000000000..da689afc2 --- /dev/null +++ b/modules/lang/org/contrib/+hugo.el @@ -0,0 +1,18 @@ +;;; +hugo.el --- ox-hugo support -*- lexical-binding: t; -*- +;;;###if (featurep! +hugo) + +(use-package! ox-hugo + :after ox + :preface + (map! :map org-mode-map + :localleader + (:prefix "e" + (:prefix ("H" . "hugo") + :desc "Subtree or File to Md to file" "H" #'org-hugo-export-wim-to-md + :desc "File to Md file" "h" #'org-hugo-export-to-md + :desc "Subtree or File to Md to file & open" "O" (λ! (org-open-file (org-hugo-export-wim-to-md))) + :desc "File to Md file & open" "o" (λ! (org-open-file (org-hugo-export-to-md))) + :desc "All subtrees (or File) to Md file(s)" "A" (λ! (org-hugo-export-wim-to-md :all-subtrees)) + :desc "File to a temporary Md buffer" "t" #'org-hugo-export-as-md)))) + +;;; +hugo.el ends here diff --git a/modules/lang/org/packages.el b/modules/lang/org/packages.el index db46d566e..f4cfd81c1 100644 --- a/modules/lang/org/packages.el +++ b/modules/lang/org/packages.el @@ -52,3 +52,8 @@ (when (featurep! +journal) (package! org-journal)) + +(when (featurep! +hugo) + (package! ox-hugo :recipe (:host github + :repo "kaushalmodi/ox-hugo" + :nonrecursive t)))