all repos — h3rald @ c37ffc546087434e3c1af95d8e109d66ac55a9b3

The sources of https://h3rald.com

Implemented rule to copy pdf article assets.
h3rald h3rald@h3rald.com
Fri, 04 Aug 2017 20:24:41 +0200
commit

c37ffc546087434e3c1af95d8e109d66ac55a9b3

parent

28c7466a3133d541951bfc18453f31b1289fbaed

1 files changed, 21 insertions(+), 0 deletions(-)

jump to
M rules.minrules.min

@@ -0,0 +1,21 @@

+'hastysite import + +( + (dict) expect -> =asset + asset /id :id + id "^pdf\/(.+)$" search 1 get :name + "output/articles/$1" (name) => % :dir + asset "assets/$1" ((asset /path)) => % :src + asset "output/articles/$1/$1.pdf" (name) => % :dest + " - Copying: $1 -> $2" (src dest) => % notice + src dest cp +) :copy-pdf-article-asset + +assets ( + dup + ( + ((/id "^pdf\/" match) (copy-pdf-article-asset)) + ;((/ext ".css" match) (process-css-asset)) + ((true) (copy2output)) + ) case +) foreach