perun

Discuss perun static site generator
martinklepsch 2016-09-08T10:44:04.000007Z

@pesterhazy: have you tried adding the permalink task to your pipeline?

pesterhazy 2016-09-08T10:44:16.000008Z

yup it's there

martinklepsch 2016-09-08T10:55:01.000009Z

ok, let me just quickly clone this into this Finnish train I'm sitting in 😄

martinklepsch 2016-09-08T10:59:28.000010Z

@pesterhazy so I don't see any use of the collection or permalink task, maybe you didn't push your latest changes?

martinklepsch 2016-09-08T11:02:02.000011Z

found it!

martinklepsch 2016-09-08T11:15:41.000012Z

@pesterhazy so the issue is that you're using permalink but not slug which permalink depends upon. Unfortunately the default slug-fn expects file names in the following format YYYY-MM-DD-slug-title.ext which your files do not work well with your file names

martinklepsch 2016-09-08T11:15:56.000013Z

(slug :slug-fn #(->> (string/split % #"[-\.]")
                             drop-last
                             (string/join "-")
                             string/lower-case))
adding this before the permalink task should fix the issue

martinklepsch 2016-09-08T11:18:12.000014Z

in that context we should probably establish some pattern that raises this kind of issue early, e.g. if permalink task depends on the result of the slug task that should be checked and informed about at runtime

pesterhazy 2016-09-08T12:29:06.000015Z

that explains it

pesterhazy 2016-09-08T12:34:06.000016Z

@martinklepsch, thanks! I made an issue: https://github.com/hashobject/perun/issues/99