can't use pagetree as argument to raco pollen render #249

Closed
opened 4 years ago by mbutterick · 5 comments
mbutterick commented 4 years ago (Migrated from github.com)

According to this comment.

(By the way, didn’t it used to be possible to specify a pagetree file explicitly, like raco pollen render posts.ptree? Maybe I’m hallucinating but I thought I had done this before. Now when I try this I get [no paths to render].)

According to [this comment](https://github.com/mbutterick/pollen/issues/248#issuecomment-786383611). > (By the way, didn’t it used to be possible to specify a pagetree file explicitly, like raco pollen render posts.ptree? Maybe I’m hallucinating but I thought I had done this before. Now when I try this I get [no paths to render].)
mbutterick commented 4 years ago (Migrated from github.com)

@otherjoel I’m not clear how to reproduce the problem you observed. The attached test case seems to work OK. What is missing?

> raco pollen render test.ptree
pollen: rendering test.ptree
pollen: rendering /bar.txt.pp
pollen: rendered /bar.txt (158 ms)
pollen: rendering /foo.txt.pp
pollen: rendered /foo.txt (221 ms)

249-test-case.zip

@otherjoel I’m not clear how to reproduce the problem you observed. The attached test case seems to work OK. What is missing? ``` > raco pollen render test.ptree pollen: rendering test.ptree pollen: rendering /bar.txt.pp pollen: rendered /bar.txt (158 ms) pollen: rendering /foo.txt.pp pollen: rendered /foo.txt (221 ms) ``` [249-test-case.zip](https://github.com/mbutterick/pollen/files/6064555/249-test-case.zip)
otherjoel commented 4 years ago (Migrated from github.com)

Yes, you're right that works.

Here's how I can reproduce the problem I was having. To your test case from #248, add a file posts/test.ptree:

#lang pollen

test.txt

Then:

❯ ls -1 posts
test.poly.pm
test.ptree

❯ raco pollen render posts/test.ptree
pollen: rendering posts/test.ptree
pollen: [no paths to render]
Yes, you're right that works. Here's how I can reproduce the problem I was having. To your test case from #248, add a file `posts/test.ptree`: ``` #lang pollen test.txt ``` Then: ``` ❯ ls -1 posts test.poly.pm test.ptree ❯ raco pollen render posts/test.ptree pollen: rendering posts/test.ptree pollen: [no paths to render] ```
otherjoel commented 4 years ago (Migrated from github.com)

You know what, I’m an idiot…the output file paths in the pagetree have to be relative to the current directory, not to the directory the pagetree file is in. Sorry for the bogus report!

You know what, I’m an idiot…the output file paths in the pagetree have to be relative to the current directory, not to the directory the pagetree file is in. Sorry for the bogus report!
otherjoel commented 4 years ago (Migrated from github.com)

OK I take it back. I thought I was an idiot but now I’m not so sure. The only reference to this that I could find in the docs is the last sentence of 14.5.1, which says:

Pagenodes can refer to files in subdirectories. Just write the pagenode as a path relative to the directory where the pagetree lives

OK I take it back. I thought I was an idiot but now I’m not so sure. The only reference to this that I could find in the docs is the last sentence of [14.5.1][1], which says: > Pagenodes can refer to files in subdirectories. Just write the pagenode as a path relative to the directory where the pagetree lives [1]: https://docs.racket-lang.org/pollen/Pagetree.html#%28part._.Making_pagetrees_with_a_source_file%29
mbutterick commented 4 years ago (Migrated from github.com)

OK, I see the problem. When a pagetree inside a subdirectory is passed to raco pollen render, the pagenodes inside of that pagetree were not being calculated relative to that subdirectory.

OK, I see the problem. When a pagetree inside a subdirectory is passed to `raco pollen render`, the pagenodes inside of that pagetree were not being calculated relative to that subdirectory.
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mbutterick/pollen#249
Loading…
There is no content yet.