Update README, note :rss-root-url setting
Add org-file-id.el and documentation tweaks.
Hard disable TOC in RSS HTML exporting
org-publish-rss.el
is a simple RSS generator for Org-mode's built-in
publishing functionality.
This package adds new options for controlling RSS generation to the
org-publish-project-alist
variable (see the Org manual if you are
new to the publishing options). It adds :auto-rss
and other options
that work similar to the included :auto-sitemap
functionality. This
should hopefully make it easy for users to add RSS feeds to existing
Org publish websites.
(use-package org-publish-rss :vc (:url "https://git.sr.ht/~taingram/org-publish-rss.git" :rev :newest))
Clone the git repo and add it to your load path. Change load path to wherever you put the repository.
git clone https://git.sr.ht/~taingram/org-publish-rss
Manually load and require the package.
(add-to-list 'load-path "~/.config/emacs/my-lisp/org-publish-rss/") (require 'org-publish-rss)
Or do the same with use-package:
(use-package org-publish-rss :load-path "~/.config/emacs/my-lisp/org-publish-rss/")
To use org-publish-rss.el
you must add the configuration options
to your org-publish-project-alist
settings. The minimum required
options are:
:html-link-home
if blank.:html-link-up
/ :html-link-home
/ :rss-link
, but that may
result in broken links.For complete list of options see the Commentary section of org-publish-rss.el.
M-x org-publish-rss [RET] PROJECT [RET]
You may get a cache error, retry this after recently publishing the corresponding project.
After generating verify the articles' <link>
tags are correct. If
not, adjust the :rss-root-url
property.
You can run this automatically by adding org-publish-rss
as a
:completion-function
which will run after any publishing action for
that project. This is the final publishing step so uploading the RSS
file will need to be handled by a separate project, see example project.
(setq org-publish-project-alist '(("blog" :base-directory "~/Documents/org/website/" :base-extension "org" :publishing-directory "~/public_html/" :publishing-function org-html-publish-to-html :html-link-home "https://example.com" :auto-rss t :rss-title "Example Posts" :rss-description "My example website." :rss-with-content all :completion-function org-publish-rss ("static" :base-directory "~/Documents/org/website/" :base-extension "css\\|jpg\\|png\||gif" :include ("rss.xml") :publishing-directory "~/public_html/" :publishing-function org-publish-attachment) ("example.com" :components ("blog" "static"))))
Note: When publishing a file you can ensure all related projects are
also published by using: org-publish-current-project
(C-c C-e P p).
Using an Org exporter adds an additional export steps and configuration that is unnecessary for a basic project.
Org project --[auto-sitemap]--> Generate Org sitemap --[ox-rss]--> Export sitemap to RSS
Org project --[org-publish-rss]--> RSS feed
Plus adding specific RSS options to org-publish-project-alist
makes
RSS more easily configurable across multiple projects.
ox-rss.el
is still a great solution if you want to convert one
monolithic Org file into an RSS feed. If you are interested in using
ox-rss with org-publish see the clever solution provided by Toon
Claes.
See LICENSE file.
This file is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
For a full copy of the GNU General Public License see http://www.gnu.org/licenses/.
Thanks to Thibaut Meyer for his feedback, suggestions, and fixes.
Thank you to the kind people on the Org mailing lists and the Org developers. If Org wasn't so great I probably would have never discovered the joys of Lisp and the Emacs community.