Add blog section
- Add a ‘posts/index.org’ that just includes all of the posts and only exports headings tagged with ‘summary’. - Add summaries to all posts. - Rename posts to include the date and time in the file name. - Add an RSS feed from the new ‘posts/index.org’ Unfortunately generating an RSS feed from the ‘index.org’ doesn't work, so this experiment is at a dead end for now.
This commit is contained in:
parent
e0fc47beb5
commit
839c53448b
11 changed files with 83 additions and 18 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,7 +1,6 @@
|
|||
/.cask
|
||||
/public
|
||||
/.org-timestamps
|
||||
/posts/index.org*
|
||||
|
||||
# Added automatically by `eldev init'.
|
||||
/.eldev
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#+STARTUP: showall
|
||||
#+FILETAGS: wdocker docker docker-compose
|
||||
#+OPTIONS: num:nil toc:nil
|
||||
#+exclude_tags: summary
|
||||
|
||||
[[https://github.com/babab/wdocker][wdocker]] is a little utility written by a [[https://benjamin.althu.es][friend]] and former colleague
|
||||
of mine. It allows you to define commands for it in a
|
||||
|
@ -159,3 +160,9 @@ before:
|
|||
variables becomes too much for you, you can call the wdocker command
|
||||
without arguments to see the commands you defined and the shell
|
||||
commands they'll run.
|
||||
|
||||
* Making docker-compose easier with wdocker :summary:
|
||||
|
||||
So easy!
|
||||
|
||||
[[file:20160221-0000-wdocker-compose.org][Read More]]
|
|
@ -1,10 +1,17 @@
|
|||
#+TITLE: New Blog
|
||||
#+DATE: <2019-10-06 Sun 12:55>
|
||||
#+exclude_tags: summary
|
||||
|
||||
* New Blog :summary:
|
||||
|
||||
It's that time again... I've started a new project to build and maintain my site
|
||||
and of course it has to come with a new blog post. I'm trying to have it
|
||||
generate an index based on the files in this directory.
|
||||
|
||||
[[file:20191006-1255-new-blog.org][Read More]]
|
||||
|
||||
* All the meta
|
||||
|
||||
I don't want it to include anything beyond the first paragraph, though. Now I
|
||||
need to write some content so that it doesn't stay at a 1 minute read. If the
|
||||
average reading speed is 225 words per minute (it's probably not, but that's
|
15
posts/20191006-1818-my-new-emacs-configuration.org
Normal file
15
posts/20191006-1818-my-new-emacs-configuration.org
Normal file
|
@ -0,0 +1,15 @@
|
|||
#+TITLE: My new Emacs configuration
|
||||
#+DATE: <2019-10-06 Sun 18:18>
|
||||
#+FILETAGS: draft
|
||||
#+exclude_tags: summary
|
||||
|
||||
* My new Emacs configuration :summary:
|
||||
|
||||
I'm still working on this one.
|
||||
|
||||
[[file:20191006-1818-my-new-emacs-configuration.org][Read More]]
|
||||
|
||||
* Setup
|
||||
|
||||
foo bar baz
|
||||
soo
|
13
posts/20200223-1828-a-very-important-blog-post.org
Normal file
13
posts/20200223-1828-a-very-important-blog-post.org
Normal file
|
@ -0,0 +1,13 @@
|
|||
#+TITLE: A very important blog post
|
||||
#+DATE: <2020-02-23 Sun 18:28>
|
||||
#+exclude_tags: summary
|
||||
|
||||
* A very important blog post :summary:
|
||||
|
||||
Very important business here.
|
||||
|
||||
[[file:20200223-1828-a-very-important-blog-post.org][Read More]]
|
||||
|
||||
* Other content
|
||||
|
||||
There is more here than what you can see.
|
|
@ -2,8 +2,10 @@
|
|||
#+TAGS: emacs
|
||||
#+COMMENT_STATUS: closed
|
||||
#+STATUS: publish
|
||||
#+DATE: Wed, 12 Apr 2023 07:02:45 GMT
|
||||
# #+DATE: Wed, 12 Apr 2023 07:02:45 GMT
|
||||
#+DATE: <2023-04-12 Wed 07:02>
|
||||
#+UPDATE_URL: /admin/modify-post/2023%252f04%252f12%252fielm-paredit
|
||||
#+exclude_tags: summary
|
||||
|
||||
For a while I've been bothered by being unable to use IELM to evaluate Emacs Lisp expressions. Then [[https://www.n16f.net/blog/making-ielm-more-comfortable/][Making IELM More Comfortable]] pointed out that using paredit in IELM causes the =RET= and =C-j= keybindings to be bound to the wrong functions and proposes to fix them. The given fix, however, appears to change the keybindings for all buffers using paredit. I don't want that, and Emacs can do better!
|
||||
|
||||
|
@ -24,3 +26,9 @@ A quick search yielded [[https://stackoverflow.com/a/13102821][Buffer-locally ov
|
|||
#+end_src
|
||||
|
||||
Defining =RET= and =C-j= as =nil= means that the keybinding defaults back to the major-mode keybinding.
|
||||
|
||||
* IELM & Paredit :summary:
|
||||
|
||||
I couldn't use IELM for a while because of Paredit. So I fixed it.
|
||||
|
||||
[[file:20230412-0702-paredit-and-ielm.org][Read More]]
|
|
@ -6,6 +6,7 @@
|
|||
#+status: publish
|
||||
#+UPDATE_URL: /admin/modify-post/2023%252f07%252f10%252fswitch-todo-state-when-clocking-in
|
||||
#+DATE: Mon, 10 Jul 2023 05:56:39 GMT
|
||||
#+exclude_tags: summary
|
||||
|
||||
This Emacs configuration snippet for org-mode changes a task's state from whatever “head” state it's in into the next state in its sequence when you clock in to a task. I do this by setting the =org-clock-in-switch-to-state= variable.
|
||||
|
||||
|
@ -76,6 +77,12 @@ Finally you just set this function as the value of =org-clock-in-switch-to-state
|
|||
(setq org-clock-in-switch-to-state #'oni-org-maybe-change-todo-state)
|
||||
#+end_src
|
||||
|
||||
* Switch TODO state when clocking in :summary:
|
||||
|
||||
For a while I wanted to automatically mark a task as in progress whenever I clocked in to it.
|
||||
|
||||
[[file:20230610-0556-switch-todo-state-when-clocking-in.org][Read More]]
|
||||
|
||||
* Footnotes
|
||||
|
||||
[fn:1] By which I mean by pressing =C-c C-t= when =org-use-fast-todo-selection= is =nil= or pressing =C-S-<right>= on the headline.
|
|
@ -1,4 +0,0 @@
|
|||
#+TITLE: A very important blog post
|
||||
#+DATE: <2020-02-23 Sun 18:28>
|
||||
|
||||
Very important business here.
|
10
posts/index.org
Normal file
10
posts/index.org
Normal file
|
@ -0,0 +1,10 @@
|
|||
#+title: posts
|
||||
#+select_tags: summary
|
||||
#+options: tags:nil num:nil
|
||||
|
||||
#+include: "./20230610-0556-switch-todo-state-when-clocking-in.org::*Switch TODO state when clocking in"
|
||||
#+include: "./20230412-0702-paredit-and-ielm.org::*IELM & Paredit"
|
||||
#+include: "./20200223-1828-a-very-important-blog-post.org::*A very important blog post"
|
||||
#+include: "./20191006-1818-my-new-emacs-configuration.org::*My new Emacs configuration"
|
||||
#+include: "./20191006-1255-new-blog.org::*New Blog"
|
||||
#+include: "./20160221-0000-wdocker-compose.org::*Making docker-compose easier with wdocker"
|
|
@ -1,8 +0,0 @@
|
|||
#+TITLE: My new Emacs configuration
|
||||
#+DATE: <2019-10-06 Sun 18:18>
|
||||
#+FILETAGS: draft
|
||||
|
||||
I'm still working on this one.
|
||||
|
||||
foo bar baz
|
||||
soo
|
19
publish.el
19
publish.el
|
@ -5,7 +5,7 @@
|
|||
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||
;; Keywords:
|
||||
;; Version: 1
|
||||
;; Package-Requires: (dockerfile-mode htmlize org org-contrib rainbow-delimiters)
|
||||
;; Package-Requires: (dockerfile-mode htmlize org org-contrib rainbow-delimiters ox-rss)
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
|
@ -29,6 +29,7 @@
|
|||
(require 'dockerfile-mode)
|
||||
(require 'ob-dot)
|
||||
(require 'ox-publish)
|
||||
(require 'ox-rss)
|
||||
(require 'rainbow-delimiters)
|
||||
(require 'subr-x)
|
||||
|
||||
|
@ -90,10 +91,20 @@
|
|||
:html-head "<link rel=\"stylesheet\" href=\"/assets/css/main.css\" type=\"text/css\"/>"
|
||||
:html-preamble (lambda (project)
|
||||
(let ((buffer (find-file-noselect (buffer-file-name))))
|
||||
(unless (string= "ryuslash.org"
|
||||
(car (org-publish-find-property (buffer-file-name) :title project)))
|
||||
(unless (member (car (org-publish-find-property (buffer-file-name) :title project))
|
||||
'("ryuslash.org" "posts"))
|
||||
(publish-format-reading-time
|
||||
(publish-calculate-reading-time buffer))))))
|
||||
("rss"
|
||||
:base-directory "posts/"
|
||||
:base-extension "org"
|
||||
:rss-extension "xml"
|
||||
:publishing-directory "public/posts/"
|
||||
:publishing-function (org-rss-publish-to-rss)
|
||||
:section-numbers nil
|
||||
:exclude ".*"
|
||||
:include ("index.org")
|
||||
:table-of-contents nil)
|
||||
("assets"
|
||||
:base-directory "."
|
||||
:recursive t
|
||||
|
@ -101,7 +112,7 @@
|
|||
:base-extension "svg\\|png\\|jpg"
|
||||
:publishing-function org-publish-attachment
|
||||
:publishing-directory "public/")
|
||||
("all" :components ("index" "assets"))))
|
||||
("all" :components ("index" "posts" "rss" "assets"))))
|
||||
|
||||
(defvar publish-feed-url-format
|
||||
;"https://gitlab.com/ryuslash/ryuslash.org/-/commits/master/%s?feed_token=Rf8otgpS8YEiYakJN4NR&format=atom"
|
||||
|
|
Loading…
Reference in a new issue