Compare commits
No commits in common. "d3b5bdcc46221c0803354b53052d4d54c1a2b0f8" and "99c5ca9fb2e14909257dddecdba6204c50f9b2f6" have entirely different histories.
d3b5bdcc46
...
99c5ca9fb2
4 changed files with 2 additions and 50 deletions
|
@ -77,8 +77,7 @@ The =deploy= target first makes sure that =build= has been executed at least onc
|
|||
deploy: ## Deploy the site to live
|
||||
@[[ -e public/index.html ]] || (echo "Run 'make build' before deploy" && exit 1)
|
||||
rsync --verbose --checksum --recursive --delete \
|
||||
--exclude '*~' --exclude '.emacs-local' --exclude 'posts/' \
|
||||
--delete-excluded \
|
||||
--exclude '*~' --exclude '.emacs-local' --delete-excluded \
|
||||
public/ ryuslash.org:ryuslash-next/
|
||||
#+end_src
|
||||
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
#+title: TIL: I can use elfeed-search-face-alist to highlight certain headlines in Elfeed
|
||||
#+tags: emacs, elfeed, til
|
||||
#+comments: on
|
||||
#+status: publish
|
||||
#+DATE: Thu, 07 Dec 2023 22:45:51 GMT
|
||||
#+UPDATE_URL: /admin/modify-post/2023%252f12%252f07%252ftil-i-can-use-elfeed-search-face-alist-to-highlight-certain-headlines-in-elfeed
|
||||
|
||||
I rediscovered that I can use =elfeed-search-face-alist= to customize how headlines are displayed in Elfeed. I had read it before [[https://nullprogram.com/blog/2015/12/03/#custom-entry-colors][on Chris Wellons' blog]], but I didn't have a use for it then.
|
||||
|
||||
With =elfeed-search-face-alist= I can define a face to be used for an article with a specific tag. I added the [[https://blabbermouth.net/][Blabbermouth]] RSS feed to my feeds.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(setq elfeed-feeds '(("https://blabbermouth.net/feed" music)))
|
||||
#+end_src
|
||||
|
||||
And created 2 taggers. One tags reviews, because those always have =/reviews/= in the url. The other has a list of bands that I'm especially interested in.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defvar oni-elfeed-blabbermouth-review-tagger
|
||||
(elfeed-make-tagger :feed-url (rx "blabbermouth.net")
|
||||
:entry-link (rx "/reviews/")
|
||||
:add 'review)
|
||||
"Tagger that marks any reviews from Blabbermouth.")
|
||||
|
||||
(defvar oni-elfeed-blabbermouth-favourite-tagger
|
||||
(elfeed-make-tagger :feed-url (rx "blabbermouth.net")
|
||||
:entry-title (rx (or "SLIPKNOT"
|
||||
(seq "DREAM" whitespace "THEATER")
|
||||
;; And so on...
|
||||
))
|
||||
:add 'favourite)
|
||||
"Tagger that highlights specific bands from Blabbermouth.")
|
||||
|
||||
(add-hook 'elfeed-new-entry-hook oni-elfeed-blabbermouth-favourite-tagger)
|
||||
(add-hook 'elfeed-new-entry-hook oni-elfeed-blabbermouth-review-tagger)
|
||||
#+end_src
|
||||
|
||||
And then I can just set up the feeds:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(add-to-list 'elfeed-search-face-alist '(review :slant italic) t)
|
||||
(add-to-list 'elfeed-search-face-alist '(favourite :foreground "#f17272") t)
|
||||
#+end_src
|
||||
|
||||
As long as the face definitions don't conflict a headline's face would be the combination of all that apply. For example, by default unread headlines are bold, so unread favourite messages would be bold and somewhat reddish.
|
|
@ -109,7 +109,7 @@ pre {
|
|||
|
||||
p { margin: 0; }
|
||||
|
||||
p + p { margin: 1rem 0 0 0; }
|
||||
p + p { margin: 1rem 0; }
|
||||
|
||||
.footdef {
|
||||
display: grid;
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
pre.src {
|
||||
overflow: auto;
|
||||
margin: 0.5rem 0;
|
||||
padding: 0.5rem 0;
|
||||
}
|
||||
|
||||
.content-wrapper {
|
||||
|
|
Loading…
Reference in a new issue