For some reason getting clj
file in my fileset.
clojure boot build
[yaml-metadata] - parsed 1 files
[markdown] - parsed 1 markdown files
({:extension "clj",
:filename "post.clj",
:full-path "/Users/podviaznikov/.boot/cache/tmp/Users/podviaznikov/meetups/clojure/oom/-grrwi1/demo/blog/post.clj",
:parent-path "demo/blog/",
:path "demo/blog/post.clj",
:permalink "/demo/blog/post.clj",
:short-filename "post",
:slug "post"}
{:extension "html",
:filename "2017-02-09-hello-world.html",
:full-path "/Users/podviaznikov/.boot/cache/tmp/Users/podviaznikov/meetups/clojure/oom/f0sqpx/public/2017-02-09-hello-world.html",
:include-atom true,
:include-rss true,
:original-path "2017-02-09-hello-world.md",
:out-dir "public",
:parent-path "public/",
:path "public/2017-02-09-hello-world.html",
:permalink "/2017-02-09-hello-world.html",
:short-filename "2017-02-09-hello-world",
:slug "2017-02-09-hello-world",
:title "hello world",
:io.perun/trace [:io.perun/yaml-metadata :io.perun/markdown]}
{:extension "md",
:filename "2017-02-09-hello-world.md",
:full-path "/Users/podviaznikov/.boot/cache/tmp/Users/podviaznikov/meetups/clojure/oom/f0sqpx/2017-02-09-hello-world.md",
:include-atom true,
:include-rss true,
:original true,
:original-path "2017-02-09-hello-world.md",
:parent-path "",
:parsed "<h2><a href=\"#hello\" name=\"hello\"></a>Hello</h2>\n<p>Welcome to the Perun Hello World Demo</p>",
:path "2017-02-09-hello-world.md",
:permalink "/2017-02-09-hello-world.md",
:short-filename "2017-02-09-hello-world",
:slug "2017-02-09-hello-world",
:title "hello world",
:io.perun/trace [:io.perun/yaml-metadata :io.perun/markdown]})
[render] - rendered 1 pages
Writing target dir(s)…
My boot file looks like this
(set-env!
:source-paths #{"src"}
:resource-paths #{"resources"}
:dependencies '[[perun "0.4.2-SNAPSHOT"]
[hiccup "1.0.5"]
[pandeiro/boot-http "0.6.3-SNAPSHOT"]])
(require '[clojure.string :as str]
'[io.perun :refer :all]
'[<http://demo.blog.post|demo.blog.post> :as post-view]
'[pandeiro.boot-http :refer [serve]])
(deftask build
"Build personal site"
[]
(comp
(markdown)
(print-meta)
(render :renderer '<http://demo.blog.post/render|demo.blog.post/render>)
(target)
))
Was it always like that or is it just me doing something different?@podviaznikov it's a result of making the base
task obsolete
I added filterer
and extensions
to print-meta
so that you could only print the things you're interested in
Perhaps we should discuss this a little, actually. One of the things I changed was that some tasks would use boot/output-files
to get the initial list of files before filtering, and now it uses boot/ls
to get all files instead. I did this because I wanted it to be as flexible as possible, and for many use cases, only using a portion of the fileset limits what you can do.
For instance, I wanted someone to be able to put an HTML file in resources
and use it as input to render
, but this wouldn't be possible with boot/output-files
It did, however have this side effect where you see all files in your fileset when you do print-meta
. A few options to make that better:
- use a default for print-meta
's extensions
that excludes clj
files. Might be hard to whitelist though, so I think it'd be better have to have an extension blacklist for this case.
- establish a convention for what files Perun will consider that excludes boot/input-files
(because this is where the clj files are)
got it. No worries, was just curious if we had that for a long time. I also do see now that print-meta
supports bunch of options. So it’s definitely not a problem for me
maybe having both whitelist and backlist options is a good idea for the future, but don’t think it’s super important for now. filterer option is there and it can be filtered any way
okay, sounds good to me