Hey little heads up on the docs, the builtins guide mentions static which doesn’t exist
I’m wondering what I should use for an about page. Just collection that doesnt use any entries?
@sooheon static should exist if you use latest perun snapshot version, which is perun 0.4.2-SNAPSHOT. Which version do you use now?
Ah it’s in snapshot ok. I’m on 0.4.1, will upgrade
yeah, static is a new one
hm was there an api change from 0.4.1 for slug? my old slug-fn doesnt work
I think it has few breaking changes. what is your slug function?
(defn slug-fn [filename]
"Parses `slug` portion out of the filename in the format: slug-title.ext"
(->> (string/split filename #"[-\.]")
drop-last
(string/join "-")
string/lower-case))
try changing signature to slug-fn [_ filename]
and using filename like this (:filename m)
Got it. Think I need to update a few others along the same lines
THanks
no problems. if you have more question, post them here
@podviaznikov Hey do you mind taking a look at https://github.com/sooheon/sooheon.com/tree/update-perun (run locally with boot dev), and comparing with the master branch? The collection and render renderer fns seem to work differently, but I cant figure out how.
taking a look now
Am I correct that there was a change from having the result of markdown be in :content key to it just outputting .html files in the public directory?
podviaznikov I resolved those issues I was having before
But now it looks like all of my markdown files, even marked :draft true will be rendered
yeah, that is a big one. You are correct
and just typing it in the browser takes you to it
Ah my bad, I was calling draft before markdown, but markdown includes the yaml reader
How should I rewrite draft if I want it to exclude not based on yaml data but based on say path?
so that I can exclude before markdown rendering happens
Ah markdown takes a filterer
yeah, was just going to say that
Nice. I really like this boot task based way. It’s easier to introspect
intermediate values and so on
I think every task takes filterer
yeah, I like it too. I usually also add target task at the end and see what files got rendered
helps me with debugging
this is more of a boot question, but there’s no way to change running tasks, right? say I change the filterer of a task, and I have boot dev running, I dont think that takes effect unless I restart the task
I think if you can start repl and load boot tasks from repl then you can reload them
I saw last week some post how to do that in boot
but never tried myself
let me try to find that link
here it is. Didn’t try it myself
That sounds awesome. This is what I thought all those boot-reload dependencies should have done :)
So podviaznikov’s method works, except that for our use case boot-http’s serve task is not suited for this, because it doesnt stop the server unless the repl is left. So you should separate the task further leaving out serve
@sooheon I ran into the same problem. If you'd like, you can build and run this branch of boot-http, which fixes that bug. https://github.com/pandeiro/boot-http/pull/59
Ah yeah I saw your PR in the github thread as well. Thanks! It seems like some awesome sleuthing
You're welcome, and thanks, I appreciate the compliment 😊
Also, reading back a bit - if your concern about rendering markdown files with draft: true is about the performance - you will only pay that cost on the first run of your watch loop, assuming the original file doesn't change. And (comp (markdown) (draft)) will result in a fileset that doesn't have those rendered files