Yesterday Michael Eliachevitch (check out his blog) made me aware of the fact that my RSS feed didn't contain the full postings but only excerpts, i.e., the first paragraph of each post. That means that if you read it with a feed reader such as elfeed (which I highly recommend!), you only can read that excerpt and have to visit the web page in order to read the complete post. (That might make sense if you have advertising on your page but I'm just happy if someone reads and likes one or another of my posts no matter how they consume it.)
As it turns out, putting just an excerpt in the feed seems to be pretty much standard behavior. So better check your feed!
In order to put your complete post content in the feed, you have to change
<description>{{ .Summary | html }}</description>
to
<description>{{ .Content | html }}</description>
in your RSS template in case you are using Hugo. If you are using cobalt like me, add
default:
# default value is "\n\n"
excerpt_separator: ""
to your _cobalt.yml
.
Make Elfeed use the secondary browser
While we're at it: I read feeds using elfeed and don't want to leave emacs for reading complete posts in case the feed has only an excerpts. At least, there's EWW, the Emacs Web Wowser.
To read the rss contents, you just hit RET
. In order to browse the post's
web page, you hit b
(elfeed-search-browse-url
) which opens the page with
browse-url-browser-function
. If hit with prefix arg (C-u
), it'll instead
invoke the function bound to browse-url-generic
.
Normally, clicking an URL in emacs should call browse-url-button-open-url
which usually calls browse-url-browser-function
(browse-url-firefox
for
me), or, if a prefix arg is given, calls
browse-url-secondary-browser-function
(which I've set to eww
). That's a
convention used in vanilla emacs and other packages and I wish that elfeed
conforms! So here's the .emacs
snippet for doing so:
(defun th/elfeed-search-browse-url-maybe-with-scndry-browser
(orig-fn &rest args)
(cl-letf (((symbol-function 'browse-url-generic)
#'browse-url-button-open-url))
(apply orig-fn args)))
(advice-add
'elfeed-search-browse-url
:around
#'th/elfeed-search-browse-url-maybe-with-scndry-browser
'((name "Make browse-url-generic call browse-url-button-open-url")))
What doas that do? Well, it makes browse-url-button-open-url
the function in
the function slot of the symbol browse-url-generic
during calls of
elfeed-search-browse-url
, i.e., when elfeed-search-browse-url
calls
browse-url-generic
it'll actually call browse-url-button-open-url
.
So now I can hit b
in elfeed to open a posting in firefox and C-u b
will
open it in EWW. Ah, what a relief!
EDIT 2021-08-13: Michael Eliachevitch just made me aware that this advice
should also be added to elfeed-show-visit
which gets called with b
from
inside an elfeed buffer that already shows the RSS description of a posting.
So that would be:
(advice-add
'elfeed-show-visit :around
#'th/elfeed-search-browse-url-maybe-with-scndry-browser
'((name "Make browse-url-generic call browse-url-button-open-url")))
Works like a charm. Thanks Michael!
Back to the blog by tags or to the overview of all posts.
Also, you can subscribe to my rss feed.