Skip to content

Conversation

@bhagany
Copy link
Contributor

@bhagany bhagany commented Dec 30, 2017

@arichiardi I think that this applies pretty much the same fix you merged in #200, but everywhere

@arichiardi
Copy link
Collaborator

Ok cool so I will test this out against the current working site I have and report back

@bhagany bhagany mentioned this pull request Dec 30, 2017
@arichiardi
Copy link
Collaborator

arichiardi commented Dec 31, 2017

So I checked this and now with the following:

(def posts-dir "blog/posts")
(perun/render :out-dir posts-dir :renderer 'com.andrearichiardi.blog.post/render-page)

I get:

target/
├── blog
│   └── posts
│       └── public
│           ├── cljs-on-gh-pages.html
│           ├── cljs-replumb-require.html
│           ├── replumb-ast.html
│           └── semantic-perun-blog.html
└── public
    ├── blog
    ...

While before it was correctly under public, also note that all my posts are in resources (not resources/public). I feel this is expected so the patch seems to work for me.
Should I try something else just to make sure?

@arichiardi
Copy link
Collaborator

Uhm, but now if I move the posts to public it is not rendering them anymore.

(let [content (slurp (boot/tmp-file (boot/tmp-get fileset path)))
path-args (if (= out-dir (:out-dir options)) ;; if custom out-dir we cannot rely on pre-built :path
[path]
[out-dir (:out-dir options) filename])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this lines seems to me to build the path that would work for me, public before the specified :out-dir.

@arichiardi
Copy link
Collaborator

So ok, I finally settled with another solution, blog posts are in resources/blog/posts and the render function is a simple:

(perun/render :renderer 'com.andrearichiardi.blog.post/render-page)

@bhagany bhagany changed the title Fix repetition of :out-dir when perun touches processes a file more than once Fix repetition of :out-dir when perun processes a file more than once Jan 3, 2018
@arichiardi
Copy link
Collaborator

arichiardi commented Jan 8, 2018

It would be great to merge this one as well and maybe deploy a SNAPSHOT with both this and the lessc task 😉

@bhagany bhagany merged commit 7712045 into master Jan 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants