1 * My Blog/Phlog Workflow
2
3 I only started really writing anything down with intention for myself
4 in the past few months. I'm slowly trying to ramp up and write a bit more.
5
6 I'm a very talking oriented person if that makes sense, and I find it
7 difficult to write things that I think are coherent. I also tend to be
8 a rambler in person who constantly over-explains. This also doesn't
9 translate well to writing.
10
11 To that point, I think part of why I talk so much is because it helps
12 me organize my thoughts. They rattle around in my head in an incoherent
13 jumbled mess and spewing them out helps me to hear what they actually are.
14
15 However, it's not always easy to talk to people. Maybe people aren't around,
16 maybe they don't want to talk, maybe they do but not about what you want
17 to talk about, etc etc.
18
19 To that end I figured I should try and write more things, even if no one
20 ever reads them, just so I can practice that act of thoughtfulness and
21 trying to codify my thoughts.
22
23 Preamble aside, I figured I'd write something about my blog posting
24 infrastructure which may be of some interest. I have two places I
25 post my blogs:
26
27 - https://spwbk.site
28 - gopher://chate.io
29
30 Because the files that represent the blog posts for these platforms
31 are pretty different, I needed a way to be able to write a post in a
32 comfortable, ergonomic way and then "deploy" it to the various places
33 I want it to be visible from. Here's what I came up with:
34
35 I write my blog posts in Emacs, in org-mode. I like org-mode and use it
36 for other stuff, and it's an environment I'm comfortable with. Additionally,
37 I can export org mode documents as HTML, which helps a lot.
38
39 So after I'm done writing my post, I save my .org file, and then export it
40 to HTML.
41
42 From there I do some minor edits on the HTML manually. This is just to update
43 some <style> tags for the HTML version so that it's not so utiltarian. If
44 I understand correctly, there should be a way to configure org so that it
45 puts my <style> values in, but I'm not sure how to do that yet. Something
46 to look into later.
47
48 After I tweak the HTML file, I now have 2 files:
49 - blog_post.org
50 - blog_post.pretty.html
51
52 Typically I still have both of these open in buffers in Emacs, so I
53 wrote a little elisp shell wrapper to shell out to rclone, which posts
54 the file in the buffer to a bucket in BackBlaze B2.
55
56 Every few minutes on my respective servers, a little script runs that
57 gets any new blog posts.
58
59 On the HTTP server it grabs the .pretty.html file, and on the gopher
60 server it grabs the .org file, and places them in their respective places.
61
62 Once this is done, the script uses https://ntfy.sh to send me a notification
63 that the files have been deployed.
64
65 To review, the process essentially looks like this:
66
67 Write in emacs -> save as .org file -> export .org as .html -> modify
68 html <style> -> upload to B2 -> wait a few minutes.
69
70 I can do all of my blogging from Emacs without ever having to touch anything
71 else, and I get a notification on my phone to confirm that the blogs have
72 been uploaded successfully!
73
74 I really like this system, and because it feels easy to use for myself,
75 I find myself blogging more and more!
76
77 Thanks for reading!