blob: b806ae349edb1c198d481d33ab29edf4d7284d31 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
#+title: Blogging in Org-Mode
#+date: 2024-02-26
#+description: A guide to blogging with org-mode, no third-party tools required.
#+filetags: :dev:
* TODO Write a post on emacs first?
- Could write-up my Doom Emacs config and workflow first, then reference here.
* TODO Configure Emacs
#+begin_src sh
emacs -nw
#+end_src
=SPC f f= ---> =~/.doom.d/config.el=
#+begin_src lisp
;; org-publish
(require 'ox-publish)
(setq org-publish-project-alist
`(("blog"
:base-directory "~/Source/cleberg.net/"
:base-extension "org"
:recursive t
:publishing-directory "~/Source/cleberg.net/public/"
:publishing-function org-html-publish-to-html
;; HTML5
:html-doctype "html5"
:html-html5-fancy t
;; Disable some Org's HTML defaults
:html-head-include-scripts nil
:html-head-include-default-style nil
:section-numbers nil
:with-title nil
;; Generate sitemap
:auto-sitemap t
:sitemap-filename "sitemap.org"
;; Customize HTML output
:html-divs ((preamble "header" "preamble")
(content "main" "content")
(postamble "footer" "postamble"))
:html-head "<link rel='stylesheet' href='/styles.css' type='text/css'>"
:html-preamble "<nav class='site-nav' aria-label='site-nav' role='navigation'>
<ul>
<li><a href='/'>Home</a></li>
<li><a href='/blog/'>Blog</a></li>
<li><a href='/services/'>Services</a></li>
<li><a href='/wiki/'>Wiki</a></li>
</ul></nav>
<h1>%t</h1>
<time datetime='%d'>%d</time>"
:html-postamble "
<p>Last build: %T</p>
<p>Created with %c</p>"
)
("static"
:base-directory "~/Source/cleberg.net/static/"
:base-extension "css\\|txt\\|jpg\\|gif\\|png"
:recursive t
:publishing-directory "~/Source/cleberg.net/public/"
:publishing-function org-publish-attachment)
("cleberg.net" :components ("blog" "static"))))
#+end_src
* TODO Build Process
* TODO Deploy Process
|