I showed you my source code, pls respond
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

2.2 KiB

Website

I use Hugo1 for my website2 which I write in Org3 before compiling to Hugo markdown4.

Setup

Download Ox-hugo4 and configure it for one-post-for-file to add support for exporting to Hugo markdown3.

(use-package ox-hugo
  :after ox)

Posts

Add a capture template for creating new blog posts.

(with-eval-after-load 'org-roam
  (add-to-list 'org-roam-capture-templates
               '("p" "Post" plain (function org-roam-capture--get-point)
                 "%?"
                 :file-name "docs/posts/${slug}"
                 :unnarrowed t
                 :head
"
,#+TITLE: ${title}
,#+AUTHOR: Christopher James Hayward
,#+DATE: %<%Y-%m-%d>

,#+OPTIONS: num:nil todo:nil tasks:nil

,#+EXPORT_FILE_NAME: ${slug}
,#+ROAM_KEY: https://chrishayward.xyz/posts/${slug}/

,#+HUGO_BASE_DIR: ../
,#+HUGO_AUTO_SET_LASTMOD: t
,#+HUGO_SECTION: posts
,#+HUGO_DRAFT: true
")))

Notes

Add a capture template for creating blog posts and notes on other peoples content / published works.

(with-eval-after-load 'org-roam
  (add-to-list 'org-roam-capture-templates
               '("n" "Notes" plain (function org-roam-capture--get-point)
                  "%?"
                  :file-name "docs/notes/${slug}"
                  :unnarrowed t
                  :head
"
,#+TITLE: ${title}
,#+AUTHOR: Christopher James Hayward

,#+OPTIONS: num:nil todo:nil tasks:nil
,#+EXPORT_FILE_NAME: ${slug}
,#+ROAM_KEY: https://chrishayward.xyz/notes/${slug}/

,#+HUGO_BASE_DIR: ../
,#+HUGO_AUTO_SET_LASTMOD: t
,#+HUGO_SECTION: notes
,#+HUGO_DRAFT: true
")))

Footnotes