[BUG]: Blog example does not produce atom.xml
REPRODUCTION
- Clone the perun repo
- cd into
examples/blog - Run
boot build
EXPECTED
- atom.xml should be produced using the
:originalkeyword as a filterer
ACTUAL
- atom-feed states there were no files to output
- No atom.xml file is emitted
More Context
-
The blog example sets the filterer to
:original, without that option it works as expected. -
The markdown task should be setting
:original trueas a meta option along with:include-rssandinclude-atom. -
May have to do with this line https://github.com/hashobject/perun/blob/master/src/io/perun.clj#L257 which could be removing the
:originalattribute from the map.final-meta (into (map #(dissoc % :rendered :original) output-meta) passthru-meta)
I noticed this too. Reading the code, I can't tell what the purpose of :original is--no code uses it, it's not documented in SPEC.md, and it's not clear why the blog example uses it instead of the default filterer.
It looks like commit 189403355d91dc8954c0f3fcff04b3ec8d63e0e4 introduced :original:
--- a/src/io/perun/markdown.clj
+++ b/src/io/perun/markdown.clj
@@ -30,7 +30,9 @@
(defn parse-file-defn [lines]
- (let [metadata {}]
+ ; we use `original` file flag to distinguish between generated files
+ ; (e.x. created those by plugins)
+ (let [metadata {:original true}]
#114 is where :include-atom and :include-rss were added. It might just be that the blog example was not updated at the same time to reflect the new intent.