diff --git a/code/blog.el b/code/blog.el new file mode 100644 index 0000000..2ca8bc1 --- /dev/null +++ b/code/blog.el @@ -0,0 +1,22 @@ + +;; code for the simple (but powerful) automation of posts creation +;; requires ox-hugo + +(defvar blog-org-files-directory "/mnt/Data/Documents/org-files/org/blog/") + +;; where the posts will be converted +(setq org-hugo-base-dir "/mnt/Data/watashinoblog/") + + +(defun generate-blog-file-path () + (concat blog-org-files-directory "/" + (format-time-string "%Y-%m-%d-%H-%M-%S") ".org")) + + +(setq org-capture-templates + `(("b" "Blog Post" entry + (file ,(lambda () (generate-blog-file-path))) ; Target file path generation + "* %?\n#+EXPORT_HUGO_DRAFT: true\n#+EXPORT_HUGO_SECTION_FRAG: \n#+TITLE: %^{Title}\n#+DATE: %U\n#+AUTHOR: Hashirama\n#+FILETAGS: %^{Tags}\n#+UPDATED: %U\n#+CREATED: %<%Y-%m-%d %a %H:%M>\n" + :empty-lines 1 ; Ensure an empty line after the captured content + :prepend t ; Insert content at the beginning of the file + :jump-to-captured t))) ; Jump to the captured position after capture diff --git a/content/posts/2024-04-24-23-58-01.md b/content/posts/2024-04-24-23-58-01.md new file mode 100644 index 0000000..58d238e --- /dev/null +++ b/content/posts/2024-04-24-23-58-01.md @@ -0,0 +1,9 @@ ++++ +title = "we are testing" +author = ["Hashirama"] +date = 2024-04-24T23:58:00-04:00 +tags = ["test", "emacs", "guix"] +draft = false ++++ + +## {#d41d8c} diff --git a/content/posts/2024-04-25-00-00-23.md b/content/posts/2024-04-25-00-00-23.md new file mode 100644 index 0000000..0b9cd31 --- /dev/null +++ b/content/posts/2024-04-25-00-00-23.md @@ -0,0 +1,9 @@ ++++ +title = "we are testing" +author = ["Hashirama"] +date = 2024-04-25T00:00:00-04:00 +tags = ["test", "emacs"] +draft = false ++++ + +## {#d41d8c} diff --git a/content/posts/2024-04-25-00-05-35.md b/content/posts/2024-04-25-00-05-35.md new file mode 100644 index 0000000..9c49688 --- /dev/null +++ b/content/posts/2024-04-25-00-05-35.md @@ -0,0 +1,9 @@ ++++ +title = "another test" +author = ["Hashirama"] +date = 2024-04-25T00:05:00-04:00 +tags = ["le-test"] +draft = false ++++ + +## {#d41d8c} diff --git a/public/404.html b/public/404.html index f580ec1..0e9c8e1 100644 --- a/public/404.html +++ b/public/404.html @@ -1,6 +1,6 @@ -
+