Compare commits

..

2 commits

2 changed files with 33 additions and 19 deletions

View file

@ -52,7 +52,8 @@
(elpaca-use-package-mode)) (elpaca-use-package-mode))
;; Wait for elpaca ;; Wait for elpaca
(elpaca-wait) (message "Waiting for elpaca")
;;(elpaca-wait)
(setq crafted-emacs-home "~/.local/share/crafted-emacs") (setq crafted-emacs-home "~/.local/share/crafted-emacs")

View file

@ -1048,22 +1048,32 @@ it in the same context. Hmmm.... sounds even better.
(class (append mlx-latex-classes snm-latex-classes)) (class (append mlx-latex-classes snm-latex-classes))
(add-to-list 'org-latex-classes class))) (add-to-list 'org-latex-classes class)))
#+END_SRC #+END_SRC
*** Org Blogging **** Blogging with Zola
gicrisf has [[https://github.com/gicrisf/ox-zola][created a package]] to export org files to Zola.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package ox-hugo
:ensure t
;; I started blogging again. To stimulate this let's add a template to get started :pin melpa
;; on a new post. :after ox)
(defvar snamellit/blog-title "test-title") (use-package ox-zola
(defun snamellit/capture-blog-post-file () :ensure (ox-zola :host github :repo "gicrisf/ox-zola" :files (:defaults "*.el" "backend" "stylesheets"))
"Create a new blog post file with a title and date." :after ox-hugo
(let* ((title (read-from-minibuffer "Post Title: ")) :config
(slug (replace-regexp-in-string "[^a-z0-9]+" "-" (downcase title)))) (require 'ox-hugo)
(setq snamellit/blog-title title) :general
(format "~/src/website/content/blog/%s-%s.md" ("<leader> o z" 'ox-zola-export-wim-to-md))
(format-time-string "%Y-%m-%d" (current-time))
slug)))
#+END_SRC #+END_SRC
#+RESULTS:
: [nil 26301 59789 776924 nil elpaca-process-queues nil nil 824000 nil]
It is a wrapper around ~ox-hugo~ to export org files to Zola. It
supports most features of it and directs the user to the [[https://ox-hugo.scripter.co/][the hugo
exporter manual.]]
*** Org Capture Customization *** Org Capture Customization
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package org-capture (use-package org-capture
@ -1080,9 +1090,9 @@ it in the same context. Hmmm.... sounds even better.
'("j" "Journal" entry (file+datetree +org-capture-journal-file) '("j" "Journal" entry (file+datetree +org-capture-journal-file)
"* %?\nEntered on %U\n %i\n %a")) "* %?\nEntered on %U\n %i\n %a"))
(add-to-list 'org-capture-templates (add-to-list 'org-capture-templates
'("b" "Blog Post" plain '("b" "Blog Post" entry
(file snamellit/capture-blog-post-file) (file+headline "~/org/snamellit/blog.org" "Blog Posts")
"+++\ntitle = %(progn snamellit/blog-title)\ndate = %t\nauthor = Peter Tillemans\nemail = pti@snamellit.com\n[taxonomies]\ntags = []\ncategories = []\n+++\n\n%?")) "** %^{Blog Title:}\n:PROPERTIES:\n:EXPORT_FILE_NAME %^{Export Filename:}\n:EXPORT_DATE: %t\n:END:\n%i%?"))
;; configure support for recipes ;; configure support for recipes
(add-to-list 'org-capture-templates (add-to-list 'org-capture-templates
@ -2190,7 +2200,10 @@ notably it integrates with *use-package* to define keybindings which
will load the package if not loaded yet. will load the package if not loaded yet.
It considerably streamlines managing evil bindings so it should offer It considerably streamlines managing evil bindings so it should offer
enough value but I just removed it, so it'll have to wait a bit. enough value but I just removed it, so it'll have to wait a bit.
** TODO Add support for zola blogposts writing in org-mode ** NEXT Add support for zola blogposts writing in org-mode
:LOGBOOK:
CLOCK: [2024-08-15 Thu 13:47]
:END:
see [[https://github.com/gicrisf/ox-zola][ox-zola]] for exporting org-mode to zola markdown. see [[https://github.com/gicrisf/ox-zola][ox-zola]] for exporting org-mode to zola markdown.
* Final Words * Final Words